Skip to content

Conversation

@rubendinho
Copy link

@rubendinho rubendinho commented Mar 22, 2022

When supplied country_codes of nil, the list_invalid_properties will raise NoMethodError because #length is being called on nil.

request = ::Plaid::LinkTokenCreateRequest.new(products: ['transactions'])

request.valid? # => false

request.list_invalid_properties # => NoMethodError: undefined method `length' for nil:NilClass

When `country_codes` is nil, the `list_invalid_properties` method will error with a NoMethodError since you cannot call `#length` on `nil`.

```
request = ::Plaid::LinkTokenCreateRequest.new(products: ['transactions'])
request.valid? # false
request.list_invalid_properties # NoMethodError: undefined method `length' for nil:NilClass
```
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.

1 participant