eleven-solutions-common-website-unique-web 21.0.35 → 21.0.36
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.
@@ -188,16 +188,30 @@ const TaxonomyForm = ({ url }) => {
|
|
188
188
|
}
|
189
189
|
}
|
190
190
|
catch (error) {
|
191
|
-
// Extract
|
191
|
+
// Extract the main error message
|
192
192
|
const errorMessage = error.message || "An unknown error occurred";
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
193
|
+
// Extract the inner exception details, if available
|
194
|
+
let innerExceptionDetails = "";
|
195
|
+
if (error.innerException) {
|
196
|
+
// If the error has an `innerException` property
|
197
|
+
innerExceptionDetails = JSON.stringify(error.innerException, null, 2);
|
198
|
+
}
|
199
|
+
else if ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) {
|
200
|
+
// If using Axios or similar libraries, look for response data
|
201
|
+
innerExceptionDetails = JSON.stringify(error.response.data, null, 2);
|
202
|
+
}
|
203
|
+
else if (error.details) {
|
204
|
+
// Look for a generic `details` property
|
205
|
+
innerExceptionDetails = JSON.stringify(error.details, null, 2);
|
206
|
+
}
|
207
|
+
// Format the final error message
|
208
|
+
const detailedMessage = innerExceptionDetails
|
209
|
+
? `${errorMessage}\n\nInner Exception Details:\n${innerExceptionDetails}`
|
197
210
|
: errorMessage;
|
198
|
-
// Display the
|
211
|
+
// Display the error details
|
199
212
|
alert("Error while adding SubType: " + detailedMessage);
|
200
|
-
|
213
|
+
// Log full error object for debugging
|
214
|
+
console.error("Error object:", error);
|
201
215
|
}
|
202
216
|
setIsModalOpen(false);
|
203
217
|
setSubCode("");
|
package/package.json
CHANGED
@@ -249,24 +249,33 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => {
|
|
249
249
|
setAllTaxonomies(fetchedTaxonomies);
|
250
250
|
}
|
251
251
|
} catch (error: any) {
|
252
|
-
// Extract
|
252
|
+
// Extract the main error message
|
253
253
|
const errorMessage = error.message || "An unknown error occurred";
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
254
|
+
|
255
|
+
// Extract the inner exception details, if available
|
256
|
+
let innerExceptionDetails = "";
|
257
|
+
|
258
|
+
if (error.innerException) {
|
259
|
+
// If the error has an `innerException` property
|
260
|
+
innerExceptionDetails = JSON.stringify(error.innerException, null, 2);
|
261
|
+
} else if (error.response?.data) {
|
262
|
+
// If using Axios or similar libraries, look for response data
|
263
|
+
innerExceptionDetails = JSON.stringify(error.response.data, null, 2);
|
264
|
+
} else if (error.details) {
|
265
|
+
// Look for a generic `details` property
|
266
|
+
innerExceptionDetails = JSON.stringify(error.details, null, 2);
|
267
|
+
}
|
268
|
+
|
269
|
+
// Format the final error message
|
270
|
+
const detailedMessage = innerExceptionDetails
|
271
|
+
? `${errorMessage}\n\nInner Exception Details:\n${innerExceptionDetails}`
|
264
272
|
: errorMessage;
|
265
273
|
|
266
|
-
// Display the
|
274
|
+
// Display the error details
|
267
275
|
alert("Error while adding SubType: " + detailedMessage);
|
268
276
|
|
269
|
-
|
277
|
+
// Log full error object for debugging
|
278
|
+
console.error("Error object:", error);
|
270
279
|
}
|
271
280
|
|
272
281
|
setIsModalOpen(false);
|