saudslm / recharge-api-node

Recharge API bindings for Node.js
14 stars 7 forks source link

Errors not show proper messages #7

Closed umarjavedse closed 4 years ago

umarjavedse commented 4 years ago

Hi @saudslm , I notice that issue after patch v1.1.1 released, before that http error send complete information of error but now just showing name: 'HTTPError'. Please have a look on it because it is not possible to understand why API throw exception. Thanks.

umarjavedse commented 4 years ago

@saudslm Issue in error handling with GOT library you are using. Please have a look on it. Thanks.

saudslm commented 4 years ago

@umarjavedse Can you tell me how can I reproduce this? I am getting a full error object on my end.

umarjavedse commented 4 years ago

@saudslm In v1.1.0 was working but after updating libraries errors not throwing full error object. I tried to debug in library but in catch just getting name: 'HTTPError' .

saudslm commented 4 years ago

@umarjavedse

I can access e.response object in catch block, in the latest version. Can you please check again?

umarjavedse commented 4 years ago

@saudslm let me check

saudslm commented 4 years ago

@umarjavedse Closing this for now, since it's working fine. I'll make sure to add it to the documentation.