Skip to content

Commit 08e1e29

Browse files
authored
Merge pull request #3051 from headlamp-k8s/fail-message
frontend: EditorDialog: Show error reason on failure
2 parents b956a17 + 84ec783 commit 08e1e29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

frontend/src/components/common/Resource/EditorDialog.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ export default function EditorDialog(props: EditorDialogProps) {
280280
apiVersion,
281281
});
282282
}
283-
setError(msg);
283+
const errorDetail = value.reason?.message || msg;
284+
setError(errorDetail);
284285
setOpen?.(true);
285286
// throw msg;
286287
throw new Error(msg);

0 commit comments

Comments
 (0)