Skip to content

Commit 84ec783

Browse files
committed
frontend: EditorDialog: Show error reason on failure
This change gives additional information to the user about resource creation failures, using the reason provided in the value object. The message in the UI will fall back to the original message when a reason is not provided in the object. Fixes: #3047 Signed-off-by: Evangelos Skopelitis <[email protected]>
1 parent b956a17 commit 84ec783

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)