From 3a099f6565fdecf3319e70c40fa317bbe1077d33 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Fri, 28 Feb 2020 17:00:45 -0400 Subject: [PATCH] correct error --- services/gunDB/contact-api/jobs/onOrders.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/gunDB/contact-api/jobs/onOrders.js b/services/gunDB/contact-api/jobs/onOrders.js index 629f3b4f..cf86db5a 100644 --- a/services/gunDB/contact-api/jobs/onOrders.js +++ b/services/gunDB/contact-api/jobs/onOrders.js @@ -133,8 +133,10 @@ const listenerForAddr = (addr, SEA) => async (order, orderID) => { .get(orderID) .put(encInvoice, ack => { if (ack.err) { - throw new Error( - `Error saving encrypted invoice to order to response usergraph: ${ack}` + rej( + new Error( + `Error saving encrypted invoice to order to response usergraph: ${ack}` + ) ) } else { res()