Simpler error throw

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2023-02-13 15:58:56 +03:00
1 parent af485fc4bd
commit 138c79a252
1 file changed
+1 -1
@@ -98,7 +98,7 @@ class NonInjectedCreateResource extends React.Component<CreateResourceProps & De
this.props.logger.warn("Failed to create resource", { resource }, result.error);
this.props.showCheckedErrorNotification(result.error, "Unknown error occured while creating resources");
throw Error(result.error);
throw result.error;
}
const { kind, apiVersion, metadata: { name, namespace }} = result.response;