xero-ruby icon indicating copy to clipboard operation
xero-ruby copied to clipboard

`summarize_errors` option does not default to `false`

Open dormi opened this issue 4 years ago • 1 comments

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 ?

dormi avatar Jun 24 '21 09:06 dormi

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.

Samsinite avatar Nov 15 '22 22:11 Samsinite