Commit fc1c549d authored by Tankred Hase's avatar Tankred Hase

Display grpc error message on desktop. Closes #1161

parent 8cc1d96f
......@@ -152,9 +152,13 @@ class GrpcAction {
// Helper functions
//
_sendIpc(event, listen, method, body) {
listen = method ? `${listen}_${method}` : listen;
return this._ipc.send(event, listen, { method, body });
async _sendIpc(event, listen, method, body) {
try {
listen = method ? `${listen}_${method}` : listen;
return await this._ipc.send(event, listen, { method, body });
} catch (err) {
throw new Error(err.details);
}
}
}
......
......@@ -170,7 +170,7 @@ describe('Action GRPC Unit Tests', () => {
it('should proxy error via ipc', async () => {
ipcRendererStub.once
.withArgs('some-listener_some-method')
.yields(null, { err: new Error('Boom!') });
.yields(null, { err: { details: 'Boom!' } });
await expect(
grpc._sendIpc(event, listen, method, body),
'to be rejected with error satisfying',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment