Error handler getting executed for success too

We are using dwolla.js to implement the IAV flow recently i started observing that error handling part is also getting executed for success case i.e

console.log('Error: ’ + JSON.stringify(err) + ’ – Response: ’ + JSON.stringify(res)); will be printed for success also. If i remember correctly this was working previously. Could you please let me know if any changes around this went and its causing this issue?

Kavya H L

Hi @Kavya_HL, Thanks for posting! There shouldn’t be any changes to how the dwolla.js library works. The final argument takes in a callback function that will be “called” when Dwolla has completed with the operation regardless of whether an error or success occurs. I believe the example shows an error-first callback where If an error occurred, it will be returned by the first err argument. If no error occurred, err will be set to null and any successful data will be returned in the second argument.