Skip to content

Commit

Permalink
Issue eventuate-clients#49: Message callback: check message body is p…
Browse files Browse the repository at this point in the history
…resent
  • Loading branch information
dartvandru committed Jul 2, 2018
1 parent 10da44c commit 24c1749
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/EventuateClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,11 @@ export default class EventuateClient {

const [ body, ...rest ] = frame.body;

if (!body) {
const err = new Error('Message body not provided');
logger.error(err);
throw err;
}

if (this.subscriptions.hasOwnProperty(subscriberId)) {
//call message callback;
Expand Down

0 comments on commit 24c1749

Please sign in to comment.