Skip to content

Commit 52e80fb

Browse files
committed
Include raw error in getErrorObject
1 parent 93d0e4b commit 52e80fb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

common/src/util/error.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export type ErrorObject = {
1616
name: string
1717
message: string
1818
stack?: string
19+
rawError?: string
1920
}
2021

2122
export function success<T>(value: T): Success<T> {
@@ -38,6 +39,7 @@ export function getErrorObject(error: any): ErrorObject {
3839
name: error.name,
3940
message: error.message,
4041
stack: error.stack,
42+
rawError: JSON.stringify(error, null, 2),
4143
}
4244
}
4345

0 commit comments

Comments
 (0)