Skip to content

Commit

Permalink
Update error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Jan 31, 2025
1 parent 3495cc8 commit 1592f80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/src/routes/item/$itemId/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export const Route = createFileRoute('/item/$itemId/')({
getPolicy('item', params.itemId)
);

if (!x) {
throw new Error('Unauthorized (Invalid Policy)');
}

if (!x.includes('read')) {
throw new Error('Unauthorized (Invalid Policy)');
}
Expand Down

0 comments on commit 1592f80

Please sign in to comment.