Skip to content

fix(nimbus): catch FmlError when FmlClient fails to parse a manifest#15019

Merged
jaredlockhart merged 1 commit into
mainfrom
15018
Mar 23, 2026
Merged

fix(nimbus): catch FmlError when FmlClient fails to parse a manifest#15019
jaredlockhart merged 1 commit into
mainfrom
15018

Conversation

@jaredlockhart
Copy link
Copy Markdown
Collaborator

Because

  • The FmlClient constructor can raise FmlError.ValidationError when a feature manifest has validation errors (e.g., a variable with both gecko-pref and default, which are now mutually exclusive as of the latest application-services build)
  • NimbusFmlLoader.fml_client() did not catch this exception, so it propagated up and caused a 500 error on any page that calls get_invalid_fields_errors() (including the audience page during experiment creation)
  • This was discovered via failing Fenix integration tests on PR chore(nimbus): Update application-services #15002 (application-services version bump) — all FIREFOX_FENIX UI tests failed with TimeoutException because the audience page returned a 500

This commit

  • Wraps the FmlClient() constructor in a try/except FmlError so invalid manifests are logged and skipped rather than crashing the page
  • Adds unit tests for the graceful degradation in both fml_client() and get_fml_errors()

Fixes #15018

Because

* The FmlClient constructor can raise FmlError.ValidationError when a
  feature manifest has validation errors (e.g. a variable with both
  gecko-pref and default, which are now mutually exclusive)
* NimbusFmlLoader.fml_client() did not catch this, causing a 500 on any
  page that calls get_invalid_fields_errors() for affected experiments
* This was discovered via failing Fenix integration tests on PR #15002

This commit

* Wraps the FmlClient() constructor in a try/except FmlError so invalid
  manifests are logged and skipped rather than crashing the page
* Adds unit tests for the graceful degradation in both fml_client() and
  get_fml_errors()

Fixes #15018
@jaredlockhart jaredlockhart added this pull request to the merge queue Mar 23, 2026
Merged via the queue into main with commit 5a5f128 Mar 23, 2026
31 checks passed
@jaredlockhart jaredlockhart deleted the 15018 branch March 23, 2026 22:20
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.

FmlClient constructor crash causes 500 when manifest has validation errors

2 participants