diff --git a/.changeset/wise-onions-type.md b/.changeset/wise-onions-type.md new file mode 100644 index 0000000000000..52d40843df723 --- /dev/null +++ b/.changeset/wise-onions-type.md @@ -0,0 +1,5 @@ +--- +"@eth-optimism/batch-submitter": patch +--- + +Correctly formatted error object to log exceptions diff --git a/packages/batch-submitter/src/exec/run-batch-submitter.ts b/packages/batch-submitter/src/exec/run-batch-submitter.ts index 69b8df7b15d23..82c2963977013 100644 --- a/packages/batch-submitter/src/exec/run-batch-submitter.ts +++ b/packages/batch-submitter/src/exec/run-batch-submitter.ts @@ -213,7 +213,7 @@ export const run = async () => { } } } catch (err) { - log.error('Cannot clear transactions', err) + log.error('Cannot clear transactions', { err }) process.exit(1) } } @@ -222,7 +222,7 @@ export const run = async () => { try { await func() } catch (err) { - log.error('Error submitting batch', err) + log.error('Error submitting batch', { err }) log.info('Retrying...') } // Sleep