dymo-api 1.0.88 → 1.0.90

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.
@@ -75,7 +75,10 @@ const isValidData = async (token, data) => {
75
75
  return response.data;
76
76
  }
77
77
  catch (error) {
78
- throw customError(5000, error.response?.data?.message || error.message);
78
+ const statusCode = error.response?.status || 500;
79
+ const errorMessage = error.response?.data?.message || error.message;
80
+ const errorDetails = JSON.stringify(error.response?.data || {});
81
+ throw customError(5000, `Error ${statusCode}: ${errorMessage}. Details: ${errorDetails}`);
79
82
  }
80
83
  };
81
84
  exports.isValidData = isValidData;
@@ -7,4 +7,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  ;
8
8
  ;
9
9
  ;
10
- ;
@@ -36,7 +36,10 @@ export const isValidData = async (token, data) => {
36
36
  return response.data;
37
37
  }
38
38
  catch (error) {
39
- throw customError(5000, error.response?.data?.message || error.message);
39
+ const statusCode = error.response?.status || 500;
40
+ const errorMessage = error.response?.data?.message || error.message;
41
+ const errorDetails = JSON.stringify(error.response?.data || {});
42
+ throw customError(5000, `Error ${statusCode}: ${errorMessage}. Details: ${errorDetails}`);
40
43
  }
41
44
  };
42
45
  /**
@@ -5,5 +5,4 @@
5
5
  ;
6
6
  ;
7
7
  ;
8
- ;
9
8
  export {};
@@ -1,8 +1,8 @@
1
1
  import type * as React from "react";
2
- export interface PhoneData {
2
+ export type PhoneData = {
3
3
  iso: any;
4
4
  phone: string;
5
- }
5
+ } | string;
6
6
  export interface CreditCardData {
7
7
  pan: string | number;
8
8
  expirationDate?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dymo-api",
3
- "version": "1.0.88",
3
+ "version": "1.0.90",
4
4
  "description": "Flow system for Dymo API.",
5
5
  "main": "dist/cjs/dymo-api.js",
6
6
  "module": "dist/esm/dymo-api.js",