Skip to content

Commit

Permalink
Use original response error message
Browse files Browse the repository at this point in the history
  • Loading branch information
HosokawaR committed Apr 6, 2023
1 parent 9b674df commit 820b684
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/infrastructure/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,7 @@ export class Api {
status: FS,
originalResponse: { data: { message: string } }
): ApiFailedStatueToError[FS] {
const message =
status === 400
? "Bad Request"
: status === 500
? originalResponse.data.message
: undefined;
const message = originalResponse.data.message;
return apiFailedStatusToError[status](message);
}

Expand Down

0 comments on commit 820b684

Please sign in to comment.