chargebee-typescript
chargebee-typescript copied to clipboard
add configuration option to allow throwing of errors instead of objects
fixes #21
Idea is that we can configure this behaviour:
const c = new ChargeBee()
c.configure({
site: '***',
api_key: '***',
useErrorObject: true
})
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.
I'm for only throwing errors!