You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
343 B

4 years ago
  1. 'use strict';
  2. /**
  3. * Determines whether the payload is an error thrown by Axios
  4. *
  5. * @param {*} payload The value to test
  6. * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
  7. */
  8. module.exports = function isAxiosError(payload) {
  9. return (typeof payload === 'object') && (payload.isAxiosError === true);
  10. };