1.0.0 • Published 3 years ago

@akinolu52/tm-error-notify v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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

######NB :=> This is returns a promise and needs to be awaited

TESTING

######- npm run test

1.0.0

3 years ago