Open pixelmund opened 2 years ago
Currently there is no easy way to throw errors inside loaders/actions. We should probably come up with an easy to use solution.
I have something like the following in my head:
<script context="module" ssr> import { NotFoundError, HttpError } from "svemix/errors" export const loader = () => { throw new NotFoundError("User not found"). throw new HttpError("Custom Error", { status: 401 }); } </script>
Which we could then make use of via instanceOf
instanceOf
--
No response
Would make life easier
Describe the bug
Currently there is no easy way to throw errors inside loaders/actions. We should probably come up with an easy to use solution.
I have something like the following in my head:
Which we could then make use of via
instanceOf
Your Example Website or App
--
Steps to Reproduce the Bug or Issue
--
Expected behavior
--
Screenshots or Videos
No response
Platform
Additional context
Would make life easier