Skip to content

Commit

Permalink
[#11145] Change server-error-response field
Browse files Browse the repository at this point in the history
  • Loading branch information
binDongKim committed Jun 18, 2024
1 parent ae11045 commit ea74d48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -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[] };
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,13 @@ export const ErrorDetailDialog = ({
<div className="w-1 h-4 rounded-sm bg-status-fail" />
Error Details
</h4>
<p className="text-sm font-semibold text-muted-foreground">{error?.path}</p>
<p className="text-sm font-semibold text-muted-foreground">{error?.instance}</p>
<p className="text-sm break-all text-muted-foreground">{error?.message}</p>
</div>
<Separator />
{error?.data && (
<div className="grid gap-2 text-sm scrollbar-hide">
<div className="grid grid-cols-[7rem_auto] gap-2">
<div className="text-muted-foreground">URL</div>
<div>{error.data.requestInfo.url}</div>
<div className="text-muted-foreground">Method</div>
<div>{error.data.requestInfo.method}</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export const ErrorToast = ({ error, title, className }: ErrorToastProps) => {
<div>
{title ? title : t('COMMON.SOMETHING_WENT_WRONG')}:
<br />
{error?.path && (
{error?.instance && (
<>
<span className="font-semibold items">{error.path}</span>
<span className="font-semibold items">{error.instance}</span>
</>
)}
</div>
Expand Down

0 comments on commit ea74d48

Please sign in to comment.