mirror of
https://github.com/documenso/documenso.git
synced 2026-08-15 02:53:32 +10:00
fix: add more logging for errors on sign or complete (#3151)
This commit is contained in:
@@ -636,9 +636,12 @@ export const fieldRouter = router({
|
||||
// Log the error for debugging purposes.
|
||||
ctx.logger.error({
|
||||
message: 'Error signing field with token',
|
||||
error: err instanceof AppError ? `[${err.code}]: ${err.message}` : err,
|
||||
error: err instanceof AppError ? `[${err.code}]: ${err.message}` : String(err),
|
||||
});
|
||||
|
||||
// Raw console.log incase we're somehow deailing with a funky error object that doesn't serialize well.
|
||||
console.log('Error signing field with token', err);
|
||||
|
||||
// Rethrow the error so that the client receives the appropriate error response.
|
||||
throw err;
|
||||
}
|
||||
@@ -668,9 +671,11 @@ export const fieldRouter = router({
|
||||
// Log the error for debugging purposes.
|
||||
ctx.logger.error({
|
||||
message: 'Error removing signed field with token',
|
||||
error: err instanceof AppError ? `[${err.code}]: ${err.message}` : err,
|
||||
error: err instanceof AppError ? `[${err.code}]: ${err.message}` : String(err),
|
||||
});
|
||||
|
||||
console.log('Error removing signed field with token', err);
|
||||
|
||||
// Rethrow the error so that the client receives the appropriate error response.
|
||||
throw err;
|
||||
}
|
||||
|
||||
@@ -636,9 +636,12 @@ export const recipientRouter = router({
|
||||
// Log the error for debugging purposes.
|
||||
ctx.logger.error({
|
||||
message: 'Error completing document with token',
|
||||
error: err instanceof AppError ? `[${err.code}]: ${err.message}` : err,
|
||||
error: err instanceof AppError ? `[${err.code}]: ${err.message}` : String(err),
|
||||
});
|
||||
|
||||
// Raw console.log incase we're somehow dealing with a funky error object that doesn't serialize well.
|
||||
console.log('Error completing document with token', err);
|
||||
|
||||
// Rethrow the error so that the client receives the appropriate error response.
|
||||
throw err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user