-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding error codes to ApiError #915
Comments
+1 for this change, as at this time distinguishing between errors (and translating them to different languages), is completely contingent on parsing the message being returned (and if that message one day got changed, it would break whatever logic we've had to build on top of it) |
I realize that when a user signs up using an already in use a |
I want to alert the user if they need to check their email for the invite link, so error code would be help on signIn here would really help |
I strongly support this request! I am developing an application for Japanese and currently there is no list of error messages, so I am having a hard time creating dictionary data. |
+1 on this. How am I supposed to provide the user additional steps if their login attempt errors because their email hasn't been verified yet, but they can't find the verification code anymore? |
Related to supabase/supabase#12739 |
Interested in this. |
Over a year later and this has not been addressed. I thought features like this were standard practice. |
no news on this? how people are handling authentication errors and internalization? |
Thought this was industry standard and not something to implement upon request. Any developments on this? |
This just made ditch supabase Auth for something else. Its standard practise to return proper errors. But till now over a year nothing has been done. There is no proper CURL documentation for us to implement the rest Auth into a SDK ourselves. Even on the little examples, errors are not treated well. this is a no no for me,shows an unserious company in this aspect |
Adding stable error keys to the returned JSON would be great (e.g., user.already.registered). That's clearer than abstract error codes ala Oracle. And the ideal would be using the structure proposed by RFC 7807:
|
+1 on this |
I ran into the same issue and started collecting possible error messages by going through the GoTrue implementation. I collect the errors for each endpoint in this Google Sheets doc. It's WIP so everything in this sheet is a little bit messy at the moment. I also created a npm package that offers an error handler method for each function of GoTrue JS and therefore also Supabase JS. |
Thx a lot Joel !
Le dim. 2 juil. 2023 à 15:24, Joel Domke ***@***.***> a
écrit :
… I ran into the same issue and started collecting possible error messages
by going through the GoTrue implementation.
I collect the errors for each endpoint in this Google Sheets doc
<https://docs.google.com/spreadsheets/d/1GRFrER_WrleH7XgrzM_wHnZNNTtdH1Bc0cGa5kvyOQM/edit?usp=sharing>.
It's WIP so everything in this sheet is a little bit messy at the moment.
I also created a npm package
<https://github.com/joeldomke/supabase-errors-js>that offers an error
handler method for each function of GoTrue JS and therefore also Supabase
JS.
—
Reply to this email directly, view it on GitHub
<#915 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABA5QT2GYVJ7FZHAZPVVMDXOFY7XANCNFSM6AAAAAAUGLI6EA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Running into the same issue – would love to have standardized error codes for auth (I'm using |
+1 on this |
Such improvement would be great for developer experience, +1 to this idea. |
Any progress on this would be great help! Is there a way we can contribute ourselves? |
+1, Firebase has these standard error codes and it really is essential if you want to, for example, translate the messages |
+1, it's hard to use registration/signin manually with react native development using supabase lib, i am a js/ts library user but i would recommend having code status too... I have already created feature request since Sept but no one have ever response to it |
+1 on this, an error code it would be great to distinguish between errors and then we can make our own internationalization, but using a switch inside an effect its no option for a first class product, if we want to scale to millions we need that feature. |
They have been busy with the unusable AI bs. |
+1. Why is this not a standard already? |
It's been two years and still no update? |
|
This is an essential feature. +1 to this |
Really, the lack of support for this is disappointing. Being able to process errors in order to show users a customized (or localized) message is an essential feature. |
It was already merged but i think its's for auth-js only is it different from supabase-js using supabase.auth? is this only for auth-js ? and supabase-js not included? const response = await supabase.auth.signInWithPassword({
email: email,
password: password,
}) |
How is this extremely basic and necessary feature still not implemented after more than 2 years??? |
That's why i stopped using supabase.. |
@Erybor This has been implemented (see https://supabase.com/docs/reference/javascript/auth-error-codes), but it's looks like there might be a bug for the "invalid login credentials" case? For example, if I use the
However, if I try to log in (
The docs pretty clearly state there should always be a code:
@mashwishi I'd say you hit that exact same bug here: #1377 (comment) I've created a new issue to track that bug: @kangmingtay I think this issue should be closed to avoid confusion about the status of this feature. |
@haydn I'm using the Python client (latest version 2.5.3), went through the full source code and there's no "code" in AuthApiError. Only "name", "message" and "status". So I'm forced to check for the strings in messages which is very frustrating. I think the Python documentation just has the JavaScript docs copy and pasted: https://supabase.com/docs/reference/python/auth-error-codes. |
@Erybor That's not surprising, looks like the Python library isn't maintained by Supabase: You probably want to go open an issue or PR in the repo to add support: |
@Erybor I will try and get this added into the Python library by next week. Yeah the error codes got added to the Python docs before I was able to add the codes into the library. I've added an issue to track this in the Python library supabase/auth-py#554 |
Feature request
Is your feature request related to a problem? Please describe.
I am building a website with supabase and the errors that is returned from
supabase.auth
only contains a general error code400
and a message in english. This makes the different errors hard to distinguish from eachother.Example:
User tries to create an account but the user is already registered so the error returned from
supabase.auth.signUp
will beDescribe the solution you'd like
If the error included a specific error code mapped to particular error then providing a custom message would be easy.
Example:
It would also be really awesome if the error codes was included in the documentation.
Describe alternatives you've considered
I've considered checking the string value returned in the error but if that would change in the future that would in turn break the application.
The text was updated successfully, but these errors were encountered: