README
TM-ERROR-NOTIFY
REQUIREMENTS
Install all required packages
axios
tm-utils
dotenv
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 Message
route - The route in which this error occured
priority - The priority level of the error N.B this determines the type of notifications that will be sent