diff --git a/web/pgadmin/utils/driver/psycopg2/__init__.py b/web/pgadmin/utils/driver/psycopg2/__init__.py index 11952e1..f22a697 100644 --- a/web/pgadmin/utils/driver/psycopg2/__init__.py +++ b/web/pgadmin/utils/driver/psycopg2/__init__.py @@ -1563,7 +1563,7 @@ Failed to reset the connection to the server due to following error: if not formatted_msg: return errmsg - errmsg += u'********** Error **********\n\n' + errmsg = u'ERROR: ' + errmsg + u'\n\n' if exception_obj.diag.severity is not None \ and exception_obj.diag.message_primary is not None: diff --git a/web/regression/javascript/history/query_history_spec.jsx b/web/regression/javascript/history/query_history_spec.jsx index 0a96244..92e5174 100644 --- a/web/regression/javascript/history/query_history_spec.jsx +++ b/web/regression/javascript/history/query_history_spec.jsx @@ -383,6 +383,25 @@ describe('QueryHistory', () => { expect(queryDetail.at(0).text()).toContain('third sql statement'); }); }); + + describe('when a fourth SQL query is executed', () => { + beforeEach(() => { + historyCollection.add({ + query: 'fourth sql statement', + start_time: new Date(2017, 12, 12, 1, 33, 5, 99), + status: false, + row_affected: 0, + total_time: '26 msec', + message: 'ERROR: unexpected error from fourth sql message', + }); + + queryEntries = historyWrapper.find(QueryHistoryEntry); + }); + + it('displays fourth query SQL in the right pane', () => { + expect(queryDetail.at(0).text()).toContain('Error Message unexpected error from fourth sql message'); + }); + }); }); describe('when several days of queries were executed', () => {