Fixed incorrect handling of the code smell for the reject API call

This commit is contained in:
Akshay Joshi
2024-06-17 18:22:38 +05:30
parent 3706c3126a
commit 2b04f3ca1d
26 changed files with 44 additions and 42 deletions

View File

@@ -114,7 +114,7 @@ function RightPanel({ schema, ...props }) {
try {
resolve(props.initValues);
} catch (error) {
reject(new Error(error));
reject(error instanceof Error ? error : Error(gettext('Something went wrong')));
}
});