beancount / fava

Fava - web interface for Beancount
https://beancount.github.io/fava/
MIT License
1.98k stars 291 forks source link

Invalid data returned in API request: Validating union failed #1738

Closed przemator closed 10 months ago

przemator commented 10 months ago

When in fava 1.27 in the Import section, I hit the Extract button and I get the following error:

Invalid data returned in API request: Validating union failed

Fava debugging shows no errors in the log. The API extract requests is a HTTP 200.

mekanics commented 10 months ago

after a real quick debugging session, I found out that the validation of the api response fails at the meta property of a posting, as it was undefined.

My guess it's that the entry_meta_validator should allow undefined https://github.com/beancount/fava/compare/v1.26.4..v1.27#diff-f4c0cbf95171873a2db676ba3e01ec28b7661f21d303351ec4a49e13689bfbb2R21-R24

or the api endpoint (/api/extract) should return the meta property in the postings

yagebu commented 10 months ago

Thanks @mekanics for debugging this :)

przemator commented 10 months ago

@mekanics thank you for the fix @yagebu could you tell me how I can use this fix? I'm currently unable to import any transactions using fava 1.27.

mekanics commented 10 months ago

@mekanics thank you for the fix @yagebu could you tell me how I can use this fix? I'm currently unable to import any transactions using fava 1.27.

Update to 1.27.1 🙂