Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #11 from C2FO/defensive_msg
Browse files Browse the repository at this point in the history
Add check for msg payload in rpc handler
  • Loading branch information
TechnotronicOz authored Nov 16, 2017
2 parents 6c40ad2 + fd5f615 commit 21f9b1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ _Options.extend({
if (correlationId in requests) {
var p = requests[correlationId];
delete requests[correlationId];
if (msg.error) {
if (msg && msg.error) {
p.errback(new Error(msg.error));
} else {
p.callback(msg);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hare",
"version": "1.0.2",
"version": "1.0.3",
"description": "Wrapper around amqp to make common patterns easier",
"keywords": [
"amqp",
Expand Down

0 comments on commit 21f9b1b

Please sign in to comment.