Skip to content

Conversation

@wodka
Copy link
Contributor

@wodka wodka commented Dec 16, 2021

fixes #21

Idea is that we can configure this behaviour:

const c = new ChargeBee()

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

@ibratoev
Copy link

ibratoev commented Feb 9, 2022

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.

@wodka
Copy link
Contributor Author

wodka commented Feb 9, 2022

I'm for only throwing errors!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Core::throwError should throw error and not an object

2 participants