You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the API is returning SQL errors in JSON responses. For instance, when I create a duplicated user, I receive the following error from the Gateway:
I believe it would be better if you return a specific error code like 409 (Conflict) and a custom error message such as "The username is already in use." At least in this case. Otherwise, clients will be forced to display a generic error like "There was an error creating your account," and the user will never know what the problem is.
The text was updated successfully, but these errors were encountered:
It seems that the API is returning SQL errors in JSON responses. For instance, when I create a duplicated user, I receive the following error from the Gateway:
{ return: { code: 500, error: true, msg: 'ERROR: duplicate key value violates unique constraint "users_username_key" (SQLSTATE 23505)' } }
I believe it would be better if you return a specific error code like 409 (Conflict) and a custom error message such as "The username is already in use." At least in this case. Otherwise, clients will be forced to display a generic error like "There was an error creating your account," and the user will never know what the problem is.
The text was updated successfully, but these errors were encountered: