ActiveCampaign / activecampaign-api-nodejs

Node.js wrapper for the ActiveCampaign API
MIT License
39 stars 36 forks source link

[BUG] Wrong error handling when 503 error message is received from ActiveCampaign API. #61

Open elribonazo opened 4 years ago

elribonazo commented 4 years ago

When activeCampaign load balancer returns a 503 error message. The NodeJS package is not able to parse or generate the response and returns the string "Error:", instead of "Error: ${error.message}" or something like that.

Expected behavior:

  1. Returning the Error object
  2. Return descriptive Error message for cases like those.

Current Behavior:

  1. Returns an empty string as error
  2. Try catch returns a string as an error, instead of an error object.