Skip to content

[bug] Empty modal after wrong input #229

Closed

Description

@bogdaaamn

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.

Screenshot_2019-10-23 Appwrite - Users

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.

Screenshot_2019-10-23 Appwrite - Users(1)

Reproduce

  • Got to Users menu
  • Press + button to add a new user
  • Wrongfully add a user
  • Get the red alert with Failed to add user
  • Press again on + button to try again

Desktop

  • OS: MacOS Mojave 10.14
  • Browser: Firefox 7.0.2 (64-bit)

Activity

  1. eldadfux commented on Oct 23, 2019

    @eldadfux
    Member

    eb288c5

    This commit should fix it. Will be released in 0.4.0, also available now on master branch.

  2. bogdaaamn commented on Oct 23, 2019

    @bogdaaamn
    ContributorAuthor

    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!

  3. eldadfux commented on Oct 24, 2019

    @eldadfux
    Member

    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.

  4. bogdaaamn commented on Oct 24, 2019

    @bogdaaamn
    ContributorAuthor

    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.

  5. eldadfux commented on Oct 24, 2019

    @eldadfux
    Member

    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.

  6. added a commit that references this issue on Sep 28, 2026
  7. added a commit that references this issue on Sep 29, 2026
  8. added 2 commits that reference this issue on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions