Skip to content

Commit df82edb

Browse files
committed
chore: Error logging
1 parent f988a50 commit df82edb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/docs/src/app/(pages)/_landing/dependents/dependents.tsx

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
import { cn } from '@/src/lib/utils'
22
import Image from 'next/image'
3-
import { crawlDependents } from './crawler'
3+
import { Result, crawlDependents } from './crawler'
44

55
export async function DependentsSection() {
6-
const dependents = await crawlDependents()
6+
let dependents: Result[] = []
7+
try {
8+
dependents = await crawlDependents()
9+
} catch (error) {
10+
console.error(error)
11+
return <section className="text-red-500">{String(error)}</section>
12+
}
713
return (
814
<section className="container">
915
<h2 className="mb-8 text-center text-3xl font-bold tracking-tighter dark:text-white md:text-4xl xl:text-5xl">

0 commit comments

Comments
 (0)