From 820b684c3907306c39326a24dcfbe2e9e7e15196 Mon Sep 17 00:00:00 2001 From: HosokawaR Date: Fri, 7 Apr 2023 00:10:23 +0900 Subject: [PATCH] Use original response error message --- src/infrastructure/api/index.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/infrastructure/api/index.ts b/src/infrastructure/api/index.ts index 72aedeae..9cb153ca 100644 --- a/src/infrastructure/api/index.ts +++ b/src/infrastructure/api/index.ts @@ -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); }