angular-errors
v4.4.2
Published
[![npm version](https://badge.fury.io/js/%40givve%2Ferrors.svg)](https://www.npmjs.com/package/@givve/errors)
Downloads
48
Readme
Npm package @givve/errors
This package adds Sentry error handling to your project.
Options
ignoreStatus?: number[];
List of http error status codes that will be ignored
reloadOnChunkFailed?: boolean;
Whether to reload on 'Loading chunk 0 failed'
Development server
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Build the library
ng build errors
Publish npm package
You need to be a member of the @givve organization
You need to login into npm
npm login
If you are using npmrc to manage accounts on multiple registries...
npmrc <profile-name>
You need to set the organization scope
npm config set scope <org-name>
Only publish dist files
cd dist/errors
Now publish
npm publish --access public
Further information: https://docs.npmjs.com/creating-and-publishing-scoped-public-packages https://docs.npmjs.com/configuring-your-npm-client-with-your-org-settings
Test the package
To test this you can add a valid sentry project dsn key in the environment.ts and throw a JS error in app.components ngOnInit func.