@agenus-io/webhook-centralizer 1.0.6 → 1.0.7
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.
- package/dist/Class/index.js +12 -9
- package/package.json +1 -1
package/dist/Class/index.js
CHANGED
|
@@ -62,15 +62,16 @@ class WebhookCentralizerSDK {
|
|
|
62
62
|
return response.data;
|
|
63
63
|
}
|
|
64
64
|
catch (error) {
|
|
65
|
+
let errorMapped = error;
|
|
65
66
|
if (error instanceof axios_1.AxiosError) {
|
|
66
|
-
|
|
67
|
+
errorMapped = error.response?.data;
|
|
67
68
|
}
|
|
68
69
|
else {
|
|
69
|
-
|
|
70
|
+
errorMapped = error;
|
|
70
71
|
}
|
|
71
72
|
return {
|
|
72
73
|
isError: true,
|
|
73
|
-
error:
|
|
74
|
+
error: errorMapped,
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
77
|
}
|
|
@@ -88,15 +89,16 @@ class WebhookCentralizerSDK {
|
|
|
88
89
|
return result;
|
|
89
90
|
}
|
|
90
91
|
catch (error) {
|
|
92
|
+
let errorMapped = error;
|
|
91
93
|
if (error instanceof axios_1.AxiosError) {
|
|
92
|
-
|
|
94
|
+
errorMapped = error.response?.data;
|
|
93
95
|
}
|
|
94
96
|
else {
|
|
95
|
-
|
|
97
|
+
errorMapped = error;
|
|
96
98
|
}
|
|
97
99
|
return {
|
|
98
100
|
isError: true,
|
|
99
|
-
error:
|
|
101
|
+
error: errorMapped,
|
|
100
102
|
};
|
|
101
103
|
}
|
|
102
104
|
}
|
|
@@ -115,15 +117,16 @@ class WebhookCentralizerSDK {
|
|
|
115
117
|
};
|
|
116
118
|
}
|
|
117
119
|
catch (error) {
|
|
120
|
+
let errorMapped = error;
|
|
118
121
|
if (error instanceof axios_1.AxiosError) {
|
|
119
|
-
|
|
122
|
+
errorMapped = error.response?.data;
|
|
120
123
|
}
|
|
121
124
|
else {
|
|
122
|
-
|
|
125
|
+
errorMapped = error;
|
|
123
126
|
}
|
|
124
127
|
return {
|
|
125
128
|
isError: true,
|
|
126
|
-
error:
|
|
129
|
+
error: errorMapped,
|
|
127
130
|
};
|
|
128
131
|
}
|
|
129
132
|
}
|
package/package.json
CHANGED