mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-07 19:54:54 -05:00
Fixed incorrect handling of the code smell for the reject API call
This commit is contained in:
@@ -388,11 +388,11 @@ export default function SearchObjects({nodeData}) {
|
||||
})
|
||||
.catch((err)=>{
|
||||
pgAdmin.Browser.notifier.error(parseApiError(err));
|
||||
reject(new Error(err));
|
||||
reject(err instanceof Error ? err : Error(gettext('Something went wrong')));
|
||||
});
|
||||
} catch (error) {
|
||||
pgAdmin.Browser.notifier.error(parseApiError(error));
|
||||
reject(new Error(error));
|
||||
reject(error instanceof Error ? error : Error(gettext('Something went wrong')));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user