mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-06-08 13:37:29 +01:00
8ab7d354e6
* Adding further console logging but also fixed lines with JSON.stringify(error) * Added retry mechanism for GETs for armRequest workflow * Moved stringifyError into its own file as it was causing strict compile issues in ErrorHandlingUtils
8 lines
301 B
TypeScript
8 lines
301 B
TypeScript
export const stringifyError = (error: unknown): string => {
|
|
const plainObject: Record<string, unknown> = {};
|
|
Object.getOwnPropertyNames(error as object).forEach((key) => {
|
|
plainObject[key] = (error as Record<string, unknown>)[key];
|
|
});
|
|
return JSON.stringify(plainObject, null, "\r\n");
|
|
};
|