1.0.5 • Published 5 years ago
@upsales/app-error v1.0.5
@upsales/app-error
Format errors consistently across upsales services
Is deployed with circleci
Usage
// Import constant and appError
const { NOTIFICATION, appError } = require('@upsales/app-error');
...
// On PUT integrationLog add to body
body: {
...
[NOTIFICATION]: appError(this._config.userId, code)
}
If code can be set to defined error messages in app-error or fallback to standard http response codes.
If no defined message or http response appError will throw an error.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
- Upsales dev team