Skip to content

Commit 3f035e4

Browse files
author
Simone Agresta
committed
Fixed error message on getRequestHandler.
The error is already rpc compliance Signed-off-by: Simone Agresta <[email protected]>
1 parent c08ef6b commit 3f035e4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/amqp/amqp-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function getRequestHandler(server, mqttserver) {
4040
server.call(payload, function (error, success) {
4141
var response = success;
4242
if (error) {
43-
response = {id: payload.id, jsonrpc: payload.jsonrpc, error: error}
43+
response = error;
4444
}
4545
var replyTo = message.fields.routingKey + '.reply';
4646
debug('publish reply', replyTo, response);

lib/mqtt/mqtt-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function getRequestHandler(server, mqttserver) {
3535
server.call(message, function (error, success) {
3636
var response = success;
3737
if (error) {
38-
response = {id: message.id, jsonrpc: message.jsonrpc, error: error}
38+
response = error;
3939
}
4040
var replyTopic = path.join(topic, 'reply');
4141
debug('publish reply', replyTopic, response);

0 commit comments

Comments
 (0)