Mangopay/mangopay2-nodejs-sdk

API errors does not reject on 1.42.1 with axios

Closed this issue · 2 comments

On version 1.42.1,

Default error handler in api config only console.log errors and does not reject or resolve anything when functions are called without callbacks.
Previous behaviour was promise rejection.

I'm experiencing the same issue. When awaiting the mangoPayClient.Users.createKycPageFromFile method I cannot handle the errors properly (when the file is missing or is too small), as the success case returns noting as well.

Based on a quick look I think reject(resolveArgument) is missing here. When I added it locally, the await createKycPageFromFile throw an error as expected with the appropriate error message.

self.errorHandler(error.message, error.response.data);

Hello @zzzz-ach & @david-kovacs-techmates thanks for the feedback. Just to confirm it will be fixed ASAP.