From fa846513c9b8237af52f52a9c4a8bcecc11acc02 Mon Sep 17 00:00:00 2001 From: QooQooDass Date: Thu, 13 Jun 2024 11:53:52 +0900 Subject: [PATCH] [#11145] Change server-error-response field --- .../main/v3/packages/constants/src/types/ErrorResponse.ts | 5 ++--- .../packages/ui/src/components/Error/ErrorDetailDialog.tsx | 4 +--- .../main/v3/packages/ui/src/components/Error/ErrorToast.tsx | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/web-frontend/src/main/v3/packages/constants/src/types/ErrorResponse.ts b/web-frontend/src/main/v3/packages/constants/src/types/ErrorResponse.ts index 294285798ebe..7b658b1990d9 100644 --- a/web-frontend/src/main/v3/packages/constants/src/types/ErrorResponse.ts +++ b/web-frontend/src/main/v3/packages/constants/src/types/ErrorResponse.ts @@ -1,15 +1,14 @@ export type ErrorResponse = { timestamp: number; status: number; - error: string; + title: string; exception: string; trace: string; message: string; - path: string; + instance: string; data: { requestInfo: { method: string; - url: string; headers: { [key: string]: string[] }; parameters: { [key: string]: string[] }; }; diff --git a/web-frontend/src/main/v3/packages/ui/src/components/Error/ErrorDetailDialog.tsx b/web-frontend/src/main/v3/packages/ui/src/components/Error/ErrorDetailDialog.tsx index e0f113d6ffcf..c18af2808ae2 100644 --- a/web-frontend/src/main/v3/packages/ui/src/components/Error/ErrorDetailDialog.tsx +++ b/web-frontend/src/main/v3/packages/ui/src/components/Error/ErrorDetailDialog.tsx @@ -48,15 +48,13 @@ export const ErrorDetailDialog = ({
Error Details -

{error?.path}

+

{error?.instance}

{error?.message}

{error?.data && (
-
URL
-
{error.data.requestInfo.url}
Method
{error.data.requestInfo.method}
diff --git a/web-frontend/src/main/v3/packages/ui/src/components/Error/ErrorToast.tsx b/web-frontend/src/main/v3/packages/ui/src/components/Error/ErrorToast.tsx index db7820561411..4518d8354ea4 100644 --- a/web-frontend/src/main/v3/packages/ui/src/components/Error/ErrorToast.tsx +++ b/web-frontend/src/main/v3/packages/ui/src/components/Error/ErrorToast.tsx @@ -17,9 +17,9 @@ export const ErrorToast = ({ error, title, className }: ErrorToastProps) => {
{title ? title : t('COMMON.SOMETHING_WENT_WRONG')}:
- {error?.path && ( + {error?.instance && ( <> - {error.path} + {error.instance} )}