fava: Improve handling of errors on async page load

When I type something invalid into the filter box (like “martin” or “test”), it takes a long time (maybe 5 seconds?) to get the error message “invalid filter”.

It wasn’t clear to me why this would take so long when all filters had a specific pattern (payee:, etc). As it turns out, an account name is valid. But looking up the transactions for an account shouldn’t take 5 seconds. Hmm, no, an account name is not valid. (In the filter box, not the account box) So what is it doing for 5 seconds?

I’m not sure what’s going exactly but maybe you can try if you see what I mean.

FWIW, Ready with 13791 directives (9645 postings in 3995 transactions).

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (21 by maintainers)

Commits related to this issue

Most upvoted comments

Mhh actually maybe not. We would have to change some internal logic though. So currently, basically all links are loaded asynchronously (with partial=true in the URL string) so Fava just renders the page minus header and sidebar and that is inserted into the page. In case of an invalid filter (which is quickly checked before any part of the page is rendered), we could also just throw a HTTP error (when partial=true) instead of rendering the page and showing the error message.