XeroAPI/xero-ruby

`summarize_errors` option does not default to `false`

dormi opened this issue · 1 comments

dormi commented

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 ?

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.