FeatureFuel
3

Send error codes for errors

Source: supabase/supabase#21479 · opened by @Jonny1987
Chore

Give each error an error code

Describe the chore

Currently many errors have the same status code (eg 400) and the only information about the error is the message. This means that in my code, I need to write a condition for this error message if I want to check for it, but this means if the error message changes then my code will no longer work.

For example, the supabase.auth.signInWithPassword() function in flutter raises error with the message "Email not confirmed" or "Invalid login credentials" in the corresponding situations. But the status code for both is 400 so I can only check for this message exactly as written.

It would be better if the response also sent an error code so that the condition could be made on this, without risking any problems if the error message gets changed in the future.

Additional context


Add any other context or screenshots that help clarify the task.

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests