errorhandler-nxg-cg
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -1,2 +0,2 @@ | ||
const msgbkr = require('./msgbkr'); | ||
const msgbkr = require('./errhndlr'); | ||
@@ -3,0 +3,0 @@ module.exports = { |
{ | ||
"name": "errorhandler-nxg-cg", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Library to connect to a message broker (like rabbitmq) and create a specific queue for error handling purposes.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "nodemon test/errhndlrTest.js" | ||
"test": "jest" | ||
}, | ||
@@ -32,3 +32,6 @@ "repository": { | ||
"utils-nxg-cg": "^1.1.1" | ||
}, | ||
"devDependencies": { | ||
"jest": "^29.1.2" | ||
} | ||
} |
const express = require('express'); | ||
const msgbkrMethods = require('../lib/index'); | ||
const errorHandler = require('../lib/index'); | ||
const {log} = require('utils-nxg-cg'); | ||
@@ -21,3 +21,3 @@ | ||
msgbkrMethods.errorQueueListener(); | ||
errorHandler.errorQueueListener(); | ||
res.json({"result":"Succesfully"}); | ||
@@ -43,3 +43,3 @@ | ||
msgbkrMethods.producerMessage(req.body, 'myqueue'); | ||
errorHandler.producerMessage(req.body, 'myqueue'); | ||
res.json({"result":"Succesfully"}); | ||
@@ -73,3 +73,3 @@ | ||
log.error(`ERROR: ${e}`); | ||
msgbkrMethods.producerErrorMessage(msg, e); | ||
errorHandler.producerErrorMessage(msg, e); | ||
res.status(500).json(e); | ||
@@ -76,0 +76,0 @@ } |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
309452
16
225
1
1