mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-06-11 15:07:30 +01:00
Added retry mechanism for GETs for armRequest workflow
This commit is contained in:
@@ -14,12 +14,12 @@ export interface HandleErrorOptions {
|
||||
redactedError?: string | ARMError | Error;
|
||||
}
|
||||
|
||||
export const stringifyError = function (err: any) {
|
||||
var plainObject: { [key: string]: any } = {};
|
||||
Object.getOwnPropertyNames(err).forEach(function (key) {
|
||||
plainObject[key] = err[key];
|
||||
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');
|
||||
return JSON.stringify(plainObject, null, "\r\n");
|
||||
};
|
||||
|
||||
export const handleError = (
|
||||
|
||||
Reference in New Issue
Block a user