onesignal-node-api icon indicating copy to clipboard operation
onesignal-node-api copied to clipboard

[Bug]: Extend APIException to give more details

Open ankursethi27 opened this issue 2 years ago • 1 comments
trafficstars

What's on your mind?

The SDK uses ApiException for sending API exceptions but clients can only read string from this object. Clients should be able to easily get fields such as HTTP status code, headers, body, message, etc. that are generic to all requests. Status Code is specially useful for emitting metrics and quickly debugging.

API exception should have fields corresponding to them e.g. status_code, body, etc.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

ankursethi27 avatar Nov 16 '23 22:11 ankursethi27

+1

jannisringwald avatar Apr 02 '24 12:04 jannisringwald