-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FAIL_ON_UNKNOWN_PROPERTIES ... is an enum a property? #104
Comments
Thanks for digging into this. Looks like the right approach. Can you post your whole stack trace? I'm wondering what the downstream effect of this field being null would be (hopefully nothing). |
No problem. Happy to have made some small contribution to this project... its really valuable for me. Here's the stack trace for when the bug is encountered: java.lang.reflect.UndeclaredThrowableException: Failed to invoke event listener method
Caused by: io.ktor.serialization.JsonConvertException: Cannot deserialize value of type |
Ah I see, Line 50 in 7cdfcab
firefly-plaid-connector-2/src/main/kotlin/net/djvk/fireflyPlaidConnector2/api/plaid/models/Item.kt Lines 73 to 79 in 7cdfcab
and the connector doesn't use anything in that response aside from Line 43 in 7cdfcab
|
Fixed in #105 |
Hey @dvankley,
Continuing the conversation we were having over in a pull request here instead, because I think its different enough to warrant a new thread.
For background, I'm now running v 1.1.2 (via docker) and I'm getting this error.
Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type net.djvk.fireflyPlaidConnector2.api.plaid.models.Products from String "statements": not one of the values accepted for Enum class: [investments, assets, auth, income, transfer, employment, income_verification, transactions, recurring_transactions, standing_orders, credit_details, identity, signal, liabilities, deposit_switch, identity_verification, balance, payment_initiation]
The root of the error is that in the openapi auto generated models used in the project, are based on an old version of the openapi spec plaid makes available. It would be nice to easily update the models based on the latest open api spec automagically (what I think PR #96 will ultimately facilitate). Ignoring differences and handling only those fields, objects, enums, etc explicitly defined would work for me just as well. I think that was the intention of commit 3165f7f you mentioned in the other thread.
The FAIL_ON_UNKNOWN_PROPERTIES parameter has the following behavior:
The error thrown in my case,
InvalidFormatException
, is derived from JsonMappingException (through MismatchedInputException, since v 2.9.Rather than an unknown jackson 'property', I think we need to specify behavior when encountering an unknown enum... either READ_UNKNOWN_ENUM_VALUES_AS_NULL or READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE
(Cudos to this on Stack Overflow)
The text was updated successfully, but these errors were encountered: