moov-io / achgateway

Payment gateway enabling automated ACH operations in a distributed and fault tolerant way.
https://moov-io.github.io/achgateway/
Apache License 2.0
52 stars 19 forks source link

feat: emit event when unable to read event #182

Closed myronjhicks closed 1 year ago

myronjhicks commented 1 year ago

Specifically speaking on the QueueACHFile event, when there is a validation error it would be helpful to receive an event that signals an error occurred handling the event. In our use case we generate the fileId so we could very easily respond to an event that is in reference to a fileId that the gateway failed to create

Example validation error msg="unable to read event: reading QueueACHFIle failed: batch #1 (WEB) Addenda05 this batch type does not allow this addenda for category: Return

adamdecaf commented 1 year ago

This is a good idea. Do you want to contribute a PR?

I'm thinking of a name for the event... InvalidQueueFile?

jrnt30 commented 1 year ago

Yeah this seems like something manageable for us!

adamdecaf commented 1 year ago

I created https://github.com/moov-io/achgateway/pull/185 to produce this new event.