Skip to content

Commit 40cb0c0

Browse files
committed
🔊 improve fallback error message
1 parent a0f3230 commit 40cb0c0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/util/error.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,15 @@ export const throwAndDelegateError = (
7676
);
7777
throw new ServerError(DELEGATE_TO_FRONTEND_CODE, errorType);
7878
}
79-
throw new ServerError(500, 'An internal error occurred');
79+
throw new ServerError(
80+
500,
81+
`An internal error occurred: ${JSON.stringify(error)}`,
82+
);
8083
};
8184

8285
export class DelegateToFrontedError extends ServerError {
8386
errorType: IntegrationErrorType;
87+
8488
constructor(errorType: IntegrationErrorType) {
8589
super(DELEGATE_TO_FRONTEND_CODE, errorType);
8690

0 commit comments

Comments
 (0)