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

@@ -265,7 +265,7 @@ define([
}).then((response)=> {
resolve(response.data.data);
}).catch((err)=>{
reject(new Error(err));
reject(err instanceof Error ? err : Error(gettext('Something went wrong')));
});
});
}}