return 404 on missing docs content instead of 500 (#2699)
### Change Type - [x] `internal` — Any other changes that don't affect the published package
This commit is contained in:
parent
d0f6ef80fc
commit
279abff228
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ async function getContentForPath(path: string) {
|
|||
const article = await db.db.get(`SELECT * FROM articles WHERE articles.path = ?`, path)
|
||||
if (article) return { type: 'article', article } as const
|
||||
|
||||
throw Error(`No content found for ${path}`)
|
||||
throw notFound()
|
||||
}
|
||||
|
||||
export async function generateMetadata({ params }: { params: { id: string | string[] } }) {
|
||||
|
|
Loading…
Reference in a new issue