mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
Ensure Javascript errors during Query Tool execution are reported as such and not as Ajax errors.. Fixes #4564
This commit is contained in:
parent
18b7483cc4
commit
4f9d2de8cd
@ -26,6 +26,7 @@ Bug fixes
|
||||
| `Issue #4459 <https://redmine.postgresql.org/issues/4459>`_ - Don't quote bigints when copying them from the Query Tool results grid.
|
||||
| `Issue #4482 <https://redmine.postgresql.org/issues/4482>`_ - Ensure compression level is passed to pg_dump when backing up in directory format.
|
||||
| `Issue #4483 <https://redmine.postgresql.org/issues/4483>`_ - Ensure the number of jobs can be specified when backing up in directory format.
|
||||
| `Issue #4564 <https://redmine.postgresql.org/issues/4564>`_ - Ensure Javascript errors during Query Tool execution are reported as such and not as Ajax errors.
|
||||
| `Issue #4730 <https://redmine.postgresql.org/issues/4730>`_ - Ensure all messages are retained in the Query Tool from long running queries.
|
||||
| `Issue #4845 <https://redmine.postgresql.org/issues/4845>`_ - Fixed potential error in the properties dialog for the Code tab.
|
||||
| `Issue #4850 <https://redmine.postgresql.org/issues/4850>`_ - Fixed an issue where Datetimepicker control opens when clicking on the label.
|
@ -169,22 +169,28 @@ class ExecuteQuery {
|
||||
self.enableSQLEditorButtons();
|
||||
}
|
||||
|
||||
if (ExecuteQuery.wasConnectionLostToPythonServer(error.response)) {
|
||||
if(error.response) {
|
||||
if(ExecuteQuery.wasConnectionLostToPythonServer(error.response)) {
|
||||
self.handleConnectionToServerLost();
|
||||
return;
|
||||
}
|
||||
const errorData = error.response.data;
|
||||
|
||||
if (self.userManagement.isPgaLoginRequired(errorData)) {
|
||||
return self.userManagement.pgaLogin();
|
||||
}
|
||||
|
||||
let msg = ExecuteQuery.extractErrorMessage(errorData);
|
||||
|
||||
self.sqlServerObject.update_msg_history(false, msg);
|
||||
// Highlight the error in the sql panel
|
||||
self.sqlServerObject._highlight_error(msg);
|
||||
} else if(error.request) {
|
||||
self.handleConnectionToServerLost();
|
||||
return;
|
||||
} else {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
const errorData = error.response.data;
|
||||
|
||||
if (self.userManagement.isPgaLoginRequired(errorData)) {
|
||||
return self.userManagement.pgaLogin();
|
||||
}
|
||||
|
||||
let msg = ExecuteQuery.extractErrorMessage(errorData);
|
||||
|
||||
self.sqlServerObject.update_msg_history(false, msg);
|
||||
// Highlight the error in the sql panel
|
||||
self.sqlServerObject._highlight_error(msg);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user