Skip to content

Commit

Permalink
Sign in: show error details (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
quietbits authored Dec 21, 2023
1 parent 4a20cc3 commit d4dea42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/api/handleApiErrorString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export const handleApiErrorString = (error: ApiError): string => {
return GENERIC_ERROR_MESSAGE;
}

return (error?.extras?.message ||
return (error?.extras?.details ||
error?.extras?.message ||
error.error ||
error ||
GENERIC_ERROR_MESSAGE) as string;
Expand Down
3 changes: 2 additions & 1 deletion src/helpers/normalizeApiError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export const normalizeApiError = (
if (JSON.stringify(error) === "{}") {
message = defaultMessage;
} else {
message = (error?.extras?.message ||
message = (error?.extras?.details ||
error?.extras?.message ||
error.error ||
error ||
defaultMessage) as string;
Expand Down

0 comments on commit d4dea42

Please sign in to comment.