@availity/exceptions-axios
Availity class to log exceptions via axios
Last updated 3 months ago by availity-bot-cicd .
MIT · Original npm · Tarball · package.json
$ cnpm install @availity/exceptions-axios 
SYNC missed versions from official npm registry.

Axios Exceptions

A package wrapping the Exceptions class to use axios. Using avLogMessagesApi to log errors.

Version

More details about configuration can be found in Exceptions-Core

Install

NPM

$ npm install @availity/exceptions-axios

Yarn

$ yarn add @availity/exceptions-axios

add module to your app.

import avExceptionsAxios from '@availity/exceptions-axios';

To configure the default Options

import avExceptionsAxios from '@availity/exceptions-axios';

avExceptionsAxios.enabled(false); // enabled defaults to true... this example would disable it
avExceptionsAxios.appId('exampleApp'); // if undefined, logs 'N/A'
avExceptionsAxios.repeatTime(5000); // sets the time in ms between logging calls for the same error message. (default 5 seconds)
});

It will automatically catch all error which bubble up to the window (error which are not caught and handled in code) and log those errors. So as long as you are not catching your error you should be able to throw and error to log it.

// this import doesn't need to be on every file, just needs to be imported once somewhere like the main index.js or App.js
import avExceptionsAxios from '@availity/exceptions-axios';

//... somewhere when something happened
throw new Error('As long as this error is not caught it will be logged');
});

Or you can manually log and error in the case where something is catching and handling errors before they bubble to the window:

import avExceptionsAxios from '@availity/exceptions-axios';

//... somewhere when something happened
avExceptionsAxios.submitError(new Error('Manually logging this error'));
});

License

MIT

Current Tags

  • 3.0.55-alpha.1                                ...           canary (2 months ago)
  • 3.0.54                                ...           latest (3 months ago)

76 Versions

  • 3.0.55-alpha.1                                ...           2 months ago
  • 3.0.55-alpha.0                                ...           2 months ago
  • 3.0.54                                ...           3 months ago
  • 3.0.54-alpha.2                                ...           4 months ago
  • 3.0.54-alpha.1                                ...           4 months ago
  • 3.0.53                                ...           5 months ago
  • 3.0.52                                ...           5 months ago
  • 3.0.51                                ...           5 months ago
  • 3.0.50                                ...           6 months ago
  • 3.0.49                                ...           6 months ago
  • 3.0.48                                ...           6 months ago
  • 3.0.47                                ...           6 months ago
  • 3.0.46                                ...           6 months ago
  • 3.1.0-alpha.9                                ...           6 months ago
  • 4.0.0-alpha.9                                ...           6 months ago
  • 3.0.45                                ...           7 months ago
  • 3.0.44                                ...           7 months ago
  • 3.0.43                                ...           7 months ago
  • 3.0.42                                ...           7 months ago
  • 3.0.41                                ...           8 months ago
  • 3.0.40                                ...           8 months ago
  • 3.0.39                                ...           8 months ago
  • 3.0.38                                ...           8 months ago
  • 3.0.37                                ...           9 months ago
  • 3.0.36                                ...           9 months ago
  • 3.0.35                                ...           9 months ago
  • 3.0.34                                ...           9 months ago
  • 3.0.33                                ...           9 months ago
  • 3.0.30                                ...           9 months ago
  • 3.0.28                                ...           9 months ago
  • 3.0.25                                ...           10 months ago
  • 3.0.24                                ...           10 months ago
  • 3.0.23                                ...           10 months ago
  • 3.0.22                                ...           10 months ago
  • 3.0.21                                ...           a year ago
  • 3.0.20                                ...           a year ago
  • 3.0.19                                ...           a year ago
  • 4.0.0-alpha.10                                ...           a year ago
  • 4.0.0-alpha.2                                ...           a year ago
  • 3.0.19-alpha.0                                ...           a year ago
  • 3.0.18                                ...           a year ago
  • 3.0.17                                ...           a year ago
  • 3.0.16                                ...           a year ago
  • 3.0.16-alpha.7                                ...           a year ago
  • 3.0.15                                ...           a year ago
  • 3.0.14                                ...           a year ago
  • 3.0.13                                ...           a year ago
  • 3.0.12                                ...           a year ago
  • 3.0.11                                ...           a year ago
  • 3.0.10                                ...           a year ago
  • 3.0.9                                ...           a year ago
  • 3.0.8                                ...           a year ago
  • 3.0.7                                ...           2 years ago
  • 3.0.6                                ...           2 years ago
  • 3.0.5                                ...           2 years ago
  • 3.0.4                                ...           2 years ago
  • 3.0.3                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 3.0.1                                ...           2 years ago
  • 3.0.1-alpha.4                                ...           2 years ago
  • 3.0.1-alpha.3                                ...           2 years ago
  • 2.8.0                                ...           2 years ago
  • 2.7.4                                ...           2 years ago
  • 2.7.3                                ...           2 years ago
  • 2.7.2-alpha.454                                ...           2 years ago
  • 2.7.1                                ...           2 years ago
  • 2.7.0                                ...           2 years ago
  • 2.6.0                                ...           2 years ago
  • 2.5.0                                ...           2 years ago
  • 2.4.8                                ...           2 years ago
  • 2.4.7                                ...           2 years ago
  • 2.4.6                                ...           2 years ago
  • 2.4.0                                ...           2 years ago
  • 2.3.3                                ...           2 years ago
  • 2.3.1                                ...           2 years ago
  • 2.3.0                                ...           2 years ago
Downloads
Today 0
This Week 76
This Month 153
Last Day 0
Last Week 0
Last Month 32
Dependencies (1)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |