Skip to content

Fix: Timeout HOT/OHSOME requests below gunicorn timeout#268

Open
susilnem wants to merge 4 commits into
developfrom
fix/timeout-issue
Open

Fix: Timeout HOT/OHSOME requests below gunicorn timeout#268
susilnem wants to merge 4 commits into
developfrom
fix/timeout-issue

Conversation

@susilnem

@susilnem susilnem commented Jul 1, 2026

Copy link
Copy Markdown
Member

Changes

  • Add timeout error message

This PR doesn't introduce any:

  • temporary files, auto-generated files or secret keys
  • n+1 queries
  • flake8 issues
  • print
  • typos
  • unwanted comments

This PR contains valid:

  • tests
  • permission checks (tests here too)
  • translations

- Add Config.DEFAULT_EXTERNAL_API_TIMEOUT (kept below the 40s gunicorn
--timeout) and use it instead of hardcoded 100/500s timeouts for
HOT Tasking Manager, geojson URL, and OHSOME requests.

- Add ValidateApiCallTimeoutError to distinguish OHSOME timeouts from
other API failures, surfacing a clear "OHSOME request timed out.
Please try again." message instead of a raw requests exception.
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 17.39130% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.45%. Comparing base (189901a) to head (8c2a3eb).

Files with missing lines Patch % Lines
project_types/validate/project.py 0.00% 13 Missing ⚠️
project_types/validate/api_calls.py 40.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #268      +/-   ##
===========================================
- Coverage    87.55%   87.45%   -0.11%     
===========================================
  Files          211      211              
  Lines        12819    12837      +18     
  Branches      1089     1089              
===========================================
+ Hits         11224    11226       +2     
- Misses        1196     1212      +16     
  Partials       399      399              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Comment thread project_types/validate/api_calls.py
Comment thread project_types/validate/api_calls.py
Comment thread project_types/validate/api_calls.py Outdated
Comment thread project_types/validate/api_calls.py
Comment thread project_types/validate/project.py Outdated
Comment thread project_types/validate/project.py Outdated
Comment thread project_types/validate/api_calls.py Outdated
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.

2 participants