2
add error code to AuthError
Source: supabase/supabase#19019 · opened by @landsman
I'm not able to do conditions for each error because there are just:
• name
• status
• message
I can not use name because it's not unique to each error.
It would make sense to introduce a unique error code that will help us write specific business logic in a catch block.
Example:
• name: AuthApiError
• message:Invalid Refresh Token: Already Used
• (new) code: refresh-token-already-used
This post is related to javascript SDK, and client, but it can be a general thing.
• name
• status
• message
I can not use name because it's not unique to each error.
It would make sense to introduce a unique error code that will help us write specific business logic in a catch block.
Example:
• name: AuthApiError
• message:Invalid Refresh Token: Already Used
• (new) code: refresh-token-already-used
This post is related to javascript SDK, and client, but it can be a general thing.
No pledges yet. Be the first to back this.
Comments
Similar requests
Make `error` codes non-optional for better error handling on the client side
4 votes · 0 comments
Send error codes for errors
3 votes · 0 comments
Standardize Error Codes Across Supabase Ecosystem
1 vote · 0 comments
Friendlier `exchangeCodeForSession()` error messages for missing auth code / code verifier (gotrue-js)
1 vote · 0 comments
Snowflake wrapper does not quote identifiers, causing failures with mixed-case column names
1 vote · 0 comments
No comments yet.