Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
lightning-bits
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitsoko services
lightning-bits
Commits
fc1c549d
Commit
fc1c549d
authored
Sep 24, 2019
by
Tankred Hase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display grpc error message on desktop. Closes #1161
parent
8cc1d96f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
grpc.js
src/action/grpc.js
+7
-3
grpc.spec.js
test/unit/action/grpc.spec.js
+1
-1
No files found.
src/action/grpc.js
View file @
fc1c549d
...
...
@@ -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
);
}
}
}
...
...
test/unit/action/grpc.spec.js
View file @
fc1c549d
...
...
@@ -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'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment