Skip to content

Commit

Permalink
fbp-protocol test suite expects this exact error
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed Sep 4, 2020
1 parent f2da0a3 commit 02e5bf5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions spec/Graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ describe('Graph protocol', () => {
client.once('message', (msg) => {
chai.expect(msg.protocol).to.equal('graph');
chai.expect(msg.command).to.equal('error');
chai.expect(msg.payload.message).to.equal('Requested graph not found');
done();
});
client.send('graph', 'addnode', {
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/Graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class GraphProtocol extends EventEmitter {
return null;
}
if (!this.graphs[payload.graph]) {
this.send('error', new Error(`Requested graph "${payload.graph}" not found`), context);
this.send('error', new Error('Requested graph not found'), context);
return null;
}
return this.graphs[payload.graph];
Expand Down

0 comments on commit 02e5bf5

Please sign in to comment.