XeroAPI / xero-ruby

Xero Ruby SDK for OAuth 2.0 generated from XeroAPI/Xero-OpenAPI
http://developer.xero.com/
MIT License
58 stars 91 forks source link

`summarize_errors` option does not default to `false` #181

Open dormi opened 3 years ago

dormi commented 3 years ago

According to the docs, the summarize_errors option defaults to false.

But to skip the XeroRuby::ApiError exception and get a mixed set of valid and unvalid results, I have to force it, using the option: summarize_errors: false in my code.

Is the default value true ?

Samsinite commented 2 years ago

Not only does it not default to false (it definitely defaults to true), but passing a boolean results in:

NoMethodError: undefined method `[]' for false:FalseClass

or

NoMethodError: undefined method `[]' for true:TrueClass

You are correct that this option is set by passing a hash (instead of a boolean) I.E. { summarize_errors: true }. IMO this documentation is really bad, I'm stumbling upon this error 5 months after you posted this issue.