@stackfactor/client-api 1.0.61 → 1.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import axios from "axios";
2
+ import { RESPONSE_TYPE } from "./constants.js";
2
3
  import https from "https";
3
4
  import utils from "./utils.js";
4
5
 
@@ -47,7 +48,7 @@ const errorToString = (error) => {
47
48
  const getErrorType = (error) => {
48
49
  if (error?.response?.status) {
49
50
  return error.response.status;
50
- } else return responseType.SERVICE_UNAVAILABLE;
51
+ } else return RESPONSE_TYPE.SERVICE_UNAVAILABLE;
51
52
  };
52
53
 
53
54
  /**
@@ -68,7 +69,7 @@ const getErrorInformation = (error) => {
68
69
  * @param {Object} error - The error returned by the server
69
70
  */
70
71
  const shouldReturnError = (returnAllExceptions, error) => {
71
- if (getErrorType(error) === responseType.UNAUTHORIZED) {
72
+ if (getErrorType(error) === RESPONSE_TYPE.UNAUTHORIZED) {
72
73
  return returnAllExceptions;
73
74
  } else {
74
75
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.0.61",
3
+ "version": "1.0.62",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {