Page MenuHomePhabricator

Fix error handling and add request timeouts to prevent indefinite hangs
Open, Needs TriagePublicFeature

Description

Steps to replicate the issue:

  • Try searching when Wikidata API is slow or unresponsive
  • Check application logs after errors occur

What happens?:

  1. Application can hang indefinitely when Wikidata API is slow (no timeouts on HTTP requests)
  2. Bare except: clauses in 9 locations catch all exceptions including SystemExit and KeyboardInterrupt, making debugging a bit difficult

What should have happened instead?:

  1. HTTP requests should timeout after 10 seconds and show the proper 404 error page
  2. Specific exception types should be caught (TypeError, KeyError, AttributeError, ValueError, requests.exceptions.RequestException)

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Add comprehensive error handling and HTTP request timeoutstoolforge-repos/paulina!170system625fix/error-handling-and-timeoutsmain
Customize query in GitLab