diff --git a/src/gui/html/js/query.js b/src/gui/html/js/query.js
index 8197c75d..a1d56a22 100644
--- a/src/gui/html/js/query.js
+++ b/src/gui/html/js/query.js
@@ -22,7 +22,7 @@
persistent: false,
onSuccess: resolve,
onFailure: (errorCode, errorMessage) => {
- reject(new Error(`Error code: ${errorCode}; ${errorMessage}`));
+ reject(new Error(errorMessage));
},
});
});
diff --git a/src/tests/gui/html/js/test_query.js b/src/tests/gui/html/js/test_query.js
index 15dfc5c2..6c0ba222 100644
--- a/src/tests/gui/html/js/test_query.js
+++ b/src/tests/gui/html/js/test_query.js
@@ -34,6 +34,6 @@ describe('query()', () => {
);
it('should fail with an Error object when an error occurs', () =>
- loot.query('fail').should.be.rejectedWith(Error, { message: 'Error code: -1; {"name":"fail","args":[]}' })
+ loot.query('fail').should.be.rejectedWith(Error, { message: '{"name":"fail","args":[]}' })
);
});