DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

329b57a346f27b9f6e4e927118c6990fd989c07c — Jonni Liljamo 1 year, 9 months ago eb83a7a
feat(shared): a few database and argon errors
1 files changed, 8 insertions(+), 0 deletions(-)

M shared/src/error/api.rs
M shared/src/error/api.rs => shared/src/error/api.rs +8 -0
@@ 25,6 25,10 @@ pub enum APIError {
    #[error("missing authorization")]
    MissingAuthorization = 10002,

    #[doc = "For when pool.get() fails"]
    #[error("database pool get failed")]
    DatabasePoolGetFailed = 10003,

    // user related errors
    #[doc = "User does not exist in the database"]
    #[error("user not found")]


@@ 34,6 38,10 @@ pub enum APIError {
    #[error("invalid credentials")]
    UserInvalidCredentials = 11001,

    #[doc = "Argon2 failed somehow"]
    #[error("password hash failed")]
    UserPasswordHashFailed = 11002,

    // login errors
    #[doc = ""]
    #[error("invalid email")]