fecgov / fec-cms

The content management system (CMS) for the new Federal Election Commission website.
https://www.fec.gov
Other
91 stars 38 forks source link

Error handling for about/careers (USAJobs API) #6276

Closed johnnyporkchops closed 1 week ago

johnnyporkchops commented 1 month ago

Summary (required)

Required reviewers

One python developer

Impacted areas of the application

/about/careers/ open_jobs.py - get_jobs() templatetag

How to test

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 72.72727% with 6 lines in your changes missing coverage. Please review.

Project coverage is 77.99%. Comparing base (e20a3e4) to head (3388d23). Report is 47 commits behind head on develop.

Files Patch % Lines
fec/home/templatetags/open_jobs.py 70.00% 3 Missing :warning:
fec/home/tests/test_usajobs.py 75.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #6276 +/- ## =========================================== - Coverage 78.01% 77.99% -0.02% =========================================== Files 291 291 Lines 9447 9467 +20 Branches 687 687 =========================================== + Hits 7370 7384 +14 - Misses 2077 2083 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

johnnyporkchops commented 2 weeks ago

@JonellaCulmer . Do you think we could come up with different wording for the first sentence in the usajobs error message "USAJobs is unavailable". After digging into this more for this ticket, I realized that there could be a scenario where it is indeed unavailable or "down", but it could also be that just the API is down or not returning the data we need to post jobs. So rather than saying "USAJobs is unavailable", could we say something more generic in the first sentence like "Something went wrong."? That way we are not essentially saying "USAJobs is unavailable....Please visit usajobs.gov..." Here is the current error message: "USAJOBS is unavailable. We are temporarily unable to post open FEC positions. Please visit usajobs.gov for more information."

UPDATE: After pairing with UX/Content team, we agreed we can leave this comment as is.