torrust / torrust-index

This repository serves as the backend for the Torrust Index project.
https://torrust.com
GNU Affero General Public License v3.0
54 stars 19 forks source link

Wrong error message for `PasswordTooLong` error #724

Closed josecelano closed 2 months ago

josecelano commented 2 months ago

Reported in: https://github.com/torrust/torrust-index-gui/issues/613

pub enum ServiceError {
    #[display(fmt = "internal server error")]
    InternalServerError,

    // ...

    #[display(fmt = "Password too short")]
    PasswordTooShort,
    #[display(fmt = "Username too long")]
    PasswordTooLong,
    #[display(fmt = "Passwords don't match")]
    PasswordsDontMatch,

    // ...

It should be:

pub enum ServiceError {
    #[display(fmt = "internal server error")]
    InternalServerError,

    // ...

    #[display(fmt = "Password too short")]
    PasswordTooShort,
    #[display(fmt = "Password too long")]
    PasswordTooLong,
    #[display(fmt = "Passwords don't match")]
    PasswordsDontMatch,

    // ...