Skip to content

[PM-33163] Fix admin panel version fetch error handling#7153

Open
boris324 wants to merge 1 commit intobitwarden:mainfrom
boris324:fix/admin-version-fetch-error-handling
Open

[PM-33163] Fix admin panel version fetch error handling#7153
boris324 wants to merge 1 commit intobitwarden:mainfrom
boris324:fix/admin-version-fetch-error-handling

Conversation

@boris324
Copy link

@boris324 boris324 commented Mar 4, 2026

Fixes #7142

Summary

Improved error handling in GetInstalledWebVersion to catch all failure scenarios that occur behind reverse proxies:

  • TaskCanceledException: Request timeouts (common behind slow proxies)
  • JsonException/KeyNotFoundException: Malformed or unexpected responses
  • Non-success HTTP status: Now logs a warning instead of silently returning "-"

Previously only HttpRequestException was caught, so timeouts and parse errors would result in unhandled exceptions, leaving the version display stuck on the spinner.

Test plan

  • Deploy behind a reverse proxy and verify the admin panel shows "Unable to fetch installed version" instead of hanging
  • Verify normal version fetch still works when web vault is accessible
  • Check logs for appropriate error/warning messages

Improve GetInstalledWebVersion to catch all failure scenarios:
- TaskCanceledException for request timeouts
- JsonException/KeyNotFoundException for malformed responses
- Log warning when HTTP response is non-successful instead of silently returning "-"

Previously only HttpRequestException was caught, so timeouts and
parse errors behind reverse proxies would result in unhandled exceptions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal Community PR board for review.
ID: PM-33163
Link: https://bitwarden.atlassian.net/browse/PM-33163

Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process.

@bitwarden-bot bitwarden-bot changed the title Fix admin panel version fetch error handling [PM-33163] Fix admin panel version fetch error handling Mar 4, 2026
@djsmith85 djsmith85 requested review from a team and dereknance March 5, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin Panel “Web Vault: Unable to fetch installed version”

3 participants