Why does payload re-throw this error? #12882
jcgsville
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In Payload's Next.js auth login function, they catch errors and rethrow them in a generic Error(). Link
Is there a reason to do this? It makes it much harder for the user of login() to distinguish the type of error they're getting if they want to write code that handles each error differently. Why not just omit the try/catch and allow the errors to bubble up
Beta Was this translation helpful? Give feedback.
All reactions