@rapharacing/error-handler
v1.3.3
Published
Error Handler
Downloads
5
Readme
Rapha Error Handler
Transform and translated error messages for client-side applications and middlware.
Features
- Babel - Write next generation JavaScript today.
- Jest - JavaScript testing framework used by Facebook.
- ESLint - Make sure you are writing a quality code.
- Prettier - Enforces a consistent style by parsing your code and re-printing it.
- Travis CI - Automate tests and linting for every push or pull request.
- Documentation - A documentation system so good, you'll actually write documentation.
- Standard Version - Automate versioning and CHANGELOG generation.
API
Table of Contents
getError
Returns a transformed and translated error message for the FE or MW. These can be further tailored for Customer service by passing an optional param
Parameters
Returns String Translated error message string
import getError from "@rapharacing/error-handler";
const error = getError("AccessDeniedException", "en");
Commands
$ yarn test # run tests with Jest
$ yarn coverage # run tests with coverage and open it on browser
$ yarn lint # lint code
$ yarn docs # generate docs
$ yarn build # generate docs and transpile code