Commit 34ab776b authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

dtl: error logging with message, stack and code (#758)

* dtl: error logging with message, stack and code

* chore: add changeset
parent 79df44e8
---
'@eth-optimism/data-transport-layer': patch
---
Better error logging in the DTL
......@@ -201,10 +201,13 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
}
} catch (err) {
if (!this.running || this.options.dangerouslyCatchAllErrors) {
this.logger.error('Caught an unhandled error', { err })
this.logger.error('Caught an unhandled error', {
message: err.toString(),
stack: err.stack,
code: err.code,
})
await sleep(this.options.pollingInterval)
} else {
// TODO: Is this the best thing to do here?
throw err
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment