Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When working on Implement SROC invoice reissuing we had to deal with a situation where we wanted to throw an error that contained details of the records in the current context.
But we were faced with the issue that we knew the error would eventually find its way to our notifiers. If we include the details in the error message we break Errbit's ability to group instances of an error. But the standard Error constructor doesn't support passing in additional values.
To avoid making things complicated for ourselves we did this
We know both Pino our logger will include these extra properties in its output and Errbit can still do its stuff.
Then when working on Fix omfg() in HandleErroredBillingBatch we did a review of all our
omfg()
calls. This led us to find this inInitiateBillingBatchService
This is an example of an error message that will block Errbit from grouping these errors. We could fix this by doing what we did in
ReissueInvoiceService
. But it's probably time to add our own custom error that allows us to do it properly.This change adds the error and applies it where applicable.