export const stringifyError = (error: unknown): string => { const plainObject: Record = {}; Object.getOwnPropertyNames(error as object).forEach((key) => { plainObject[key] = (error as Record)[key]; }); return JSON.stringify(plainObject, null, "\r\n"); };