1.0.0 • Published 5 years ago
@akinolu52/tm-error-notify v1.0.0
TM-ERROR-NOTIFY
REQUIREMENTS
Install all required packages
axiostm-utilsdotenv
For testing
mocha and chai
INITIALIZATION
const errorLogger = require(package-name);
errorLogger.init({
baseUrl: `Notifications base url`,
phoneNumber: `The whatsApp phone Number the text is been sent to`,
slackUrl: `The slack url for the slack handle the message is been sent`,
})ERROR LOGGING
errorLogger.logError(error, route, priority);error - Error Messageroute - The route in which this error occuredpriority - The priority level of the error N.B this determines the type of notifications that will be sent
######NB :=> This is returns a promise and needs to be awaited
TESTING
######- npm run test
1.0.0
5 years ago