diff options
Diffstat (limited to 'elm/Lib/Api.elm')
-rw-r--r-- | elm/Lib/Api.elm | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/elm/Lib/Api.elm b/elm/Lib/Api.elm index fd4a3a7e..5b1bf583 100644 --- a/elm/Lib/Api.elm +++ b/elm/Lib/Api.elm @@ -23,29 +23,26 @@ showResponse res = in case res of HTTPError (Http.Timeout) -> "Network timeout, please try again later." HTTPError (Http.NetworkError) -> "Network error, please try again later." + HTTPError (Http.BadStatus 403) -> "Permission denied. Your session may have expired, try reloading the page." + HTTPError (Http.BadStatus 413) -> "File upload too large." + HTTPError (Http.BadStatus 429) -> "Action throttled, please try again later." HTTPError (Http.BadStatus r) -> "Server error " ++ String.fromInt r ++ ", please try again later or report an issue if this persists." HTTPError (Http.BadBody r) -> "Invalid response from the server, please report a bug (debug info: " ++ r ++")." HTTPError (Http.BadUrl _) -> unexp Success -> unexp Redirect _ -> unexp - CSRF -> "Invalid CSRF token, please refresh the page and try again." Invalid -> "Invalid form data, please report a bug." Editsum -> "Invalid edit summary." Unauth -> "You do not have the permission to perform this action." Unchanged -> "No changes" Content _ -> unexp - BadLogin -> "Invalid username or password." - LoginThrottle -> "Action throttled, too many failed login attempts." - InsecurePass -> "Your chosen password is in a database of leaked passwords, please choose another one." - BadEmail -> "Unknown email address." - Bot -> "Invalid answer to the anti-bot question." - Taken -> "Username already taken, please choose a different name." - DoubleEmail -> "Email address already used for another account." - DoubleIP -> "You can only register one account from the same IP within 24 hours." - BadCurPass -> "Current password is invalid." - MailChange -> unexp - ImgFormat -> "Unrecognized image format, only JPEG and PNG are accepted." + ImgFormat -> "Unrecognized image format, only JPEG, PNG and WebP are accepted." + LabelId _ -> unexp + DupNames _ -> "Name or alias already in the database." Releases _ -> unexp + Resolutions _ -> unexp + Engines _ -> unexp + DRM _ -> unexp BoardResult _ -> unexp TagResult _ -> unexp TraitResult _ -> unexp @@ -55,6 +52,8 @@ showResponse res = CharResult _ -> unexp AnimeResult _ -> unexp ImageResult _ -> unexp + UListWidget _ -> unexp + AdvSearchQuery _ -> unexp expectResponse : (Response -> msg) -> Http.Expect msg |