chargebee-typescript icon indicating copy to clipboard operation
chargebee-typescript copied to clipboard

add configuration option to allow throwing of errors instead of objects

Open wodka opened this issue 4 years ago • 2 comments

fixes #21

Idea is that we can configure this behaviour:

const c = new ChargeBee()

c.configure({
  site: '***',
  api_key: '***',
  useErrorObject: true
})

wodka avatar Dec 16 '21 07:12 wodka

It is a bit strange having an option to throw errors instead of objects. What is the point of throwing objects at all? It is a standard JS practice of using Error for... errors.

ibratoev avatar Feb 09 '22 14:02 ibratoev

I'm for only throwing errors!

wodka avatar Feb 09 '22 15:02 wodka