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
Description
After wrongfully trying to create a user in the Users menu and getting Failed to creat user alert, the add user modal is not working anymore. It is just empty.
For instance, I try to create a user with a short password.
The response of the request is 400 error and the Invalid password message, which is legit.
{
"message":"Invalid password: Password must be between 6 and 32 chars and contain ...",
"code":400,
"file":"\/usr\/share\/nginx\/html\/vendor\/utopia-php\/framework\/src\/App.php",
"line":456
}
But afterwards, any time I try to press on the + button to create a new user, the model is empty.
Based on this issue I was thinking of a feature that would also show what kind of error is, since we get it from the response. Not only Failed to create user or Failed to create team
I can make an issue and also work on it, if you find it useful @eldadfux!
I think we should treat this as per case thing instead of a simple project-wide task that can affect all errors.
Exposing too much information when throwing errors can be considers as a security weakness in some cases and in other cases just passing to the client the API error AS IS can have a really bad UX as it might be too technical or just too long.
So basically we have the API error that are thrown from exceptions. Our error handler only show 4** error to the users and all other errors get 5** server error generic message. In dev mode the error are much more verbose for debugging.
The console manages errors in a per form error message logic.
Oh yeah, of course! I wasn't thinking about printing the API errors AS THEY ARE, just getting a friendlier message.
For instance, when I used a weak password, instead of Failed to create user could've been Password too weak or something equivalent. But you solved this issue in UX with eb288c5, so atm I don't really have another use case.
Activity
eldadfux commentedon Oct 23, 2019
eb288c5
This commit should fix it. Will be released in 0.4.0, also available now on master branch.
bogdaaamn commentedon Oct 23, 2019
ok, perfect!
Based on this issue I was thinking of a feature that would also show what kind of error is, since we get it from the response. Not only Failed to create user or Failed to create team
I can make an issue and also work on it, if you find it useful @eldadfux!
eldadfux commentedon Oct 24, 2019
I think we should treat this as per case thing instead of a simple project-wide task that can affect all errors.
Exposing too much information when throwing errors can be considers as a security weakness in some cases and in other cases just passing to the client the API error AS IS can have a really bad UX as it might be too technical or just too long.
So basically we have the API error that are thrown from exceptions. Our error handler only show 4** error to the users and all other errors get 5** server error generic message. In dev mode the error are much more verbose for debugging.
The console manages errors in a per form error message logic.
@bogdaaamn let me know what you think.
bogdaaamn commentedon Oct 24, 2019
Oh yeah, of course! I wasn't thinking about printing the API errors AS THEY ARE, just getting a friendlier message.
For instance, when I used a weak password, instead of Failed to create user could've been Password too weak or something equivalent. But you solved this issue in UX with eb288c5, so atm I don't really have another use case.
I'll see if something else pops up.
eldadfux commentedon Oct 24, 2019
Thats a valid point. I think it will be good to review all the errors thrown inside the controllers and makes sure they are consisted.
Another thing I wanted to improve is to force better error handling inside the Utopia PHP validator interface. Currently this validator only support a description and that's not really the same thing as an error message.
https://github.com/utopia-php/framework/blob/master/src/Validator.php
Thinking about adding a message setter and getter and make Utopia use the message instead of the description when reporting errors.
Merge pull request #229 from utopia-php/fix/nats-publish-many
Merge pull request appwrite#229 from utopia-php/fix/nats-publish-many
Merge pull request appwrite#229 from utopia-php/feat/source-request-c…
feat(migration): confine source requests to a destinations policy