Skip to content

Commit

Permalink
fix: use login error instead of raw message
Browse files Browse the repository at this point in the history
  • Loading branch information
purefunctor committed May 1, 2024
1 parent 3bd7190 commit 8dec2f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/backend/Routes/Api/Login.ml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let handler request =
Dream.json @@ string_of_login_salt_response { salt }
| Error (#Caqti_error.t as e) ->
Dream.error (fun log -> log "Failed with %s" @@ Caqti_error.show e);
Dream.respond ~code:422 "Invalid payload."
Dream.respond ~code:422 @@ string_of_login_error_content `CouldNotLogIn
in
let handle_auth _ _ = assert false in
let inner ({ username; auth_token } : login_payload) =
Expand Down

0 comments on commit 8dec2f4

Please sign in to comment.