mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed issues introduce by SonarQube fixes.
This commit is contained in:
@@ -116,10 +116,14 @@ export default class SchemaDiffUI {
|
||||
|
||||
raise_error_on_fail(alert_title, xhr) {
|
||||
try {
|
||||
var err = JSON.parse(xhr.responseText);
|
||||
Notify.alert(alert_title, err.errormsg);
|
||||
if (_.isUndefined(xhr.responseText)) {
|
||||
Notify.alert(alert_title, gettext('Unable to get the response text.'));
|
||||
} else {
|
||||
var err = JSON.parse(xhr.responseText);
|
||||
Notify.alert(alert_title, err.errormsg);
|
||||
}
|
||||
} catch (e) {
|
||||
Notify.alert(alert_title, e.statusText);
|
||||
Notify.alert(alert_title, gettext(e.message));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user