mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 19:08:26 +00:00
Show errors from failed register request
Also include a `@` in the valid chars for "idents". This allows to use an e-mail address as username.
This commit is contained in:
@ -164,12 +164,14 @@ errorToString : Http.Error -> String
|
||||
errorToString error =
|
||||
let
|
||||
f sc =
|
||||
case sc of
|
||||
404 ->
|
||||
"The requested resource doesn't exist."
|
||||
if sc == 404 then
|
||||
"The requested resource doesn't exist."
|
||||
|
||||
_ ->
|
||||
"There was an invalid response status: " ++ String.fromInt sc
|
||||
else if sc >= 400 && sc < 500 then
|
||||
"Invalid input when processing the request."
|
||||
|
||||
else
|
||||
"There was an invalid response status: " ++ String.fromInt sc ++ "."
|
||||
in
|
||||
errorToStringStatus error f
|
||||
|
||||
|
Reference in New Issue
Block a user