Skip to content

Commit

Permalink
error() throws by itself
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Nov 15, 2024
1 parent 7d25c4b commit 23d5e32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/load/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export default async function load({ fetch, params, url }: Load) {
const { data: document, error: err } = await documents.get(+params.id, fetch);

if (err) {
throw error(err.status, err.message);
return error(err.status, err.message);
}

if (!document) {
throw error(404, "Document not found");
return error(404, "Document not found");
}

let mode: ViewerMode =
Expand Down

0 comments on commit 23d5e32

Please sign in to comment.