fix(logs): log error cause when object, sign in oidc debug messages (#3054)
Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
1 parent
347c6d1519
commit
2bdb1c75f6
2 files changed
+7
No files matched your search
@@ -22,6 +22,10 @@ export const formatErrorCause = (cause: unknown, iteration = 0): string => {
|
||||
return `\ncaused by ${formatErrorTitle(cause)}\n${formatErrorStack(cause.stack)}${formatErrorCause(cause.cause, iteration + 1)}`;
|
||||
}
|
||||
|
||||
if (cause instanceof Object) {
|
||||
return `\ncaused by ${JSON.stringify(cause)}`;
|
||||
}
|
||||
|
||||
return `\ncaused by ${cause as string}`;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user