Numeric values incorrectly being converted to numbers in environment documents

Incident Report for Flagsmith

Postmortem

What Happened

On Monday 3rd March at around 17:00 UTC, we deployed a release to the Edge API that inadvertently changed the JSON types returned for integer-typed feature state values. Values that had previously been returned as JSON strings (e.g., "300") began returning as JSON numbers (e.g., 300). The change affected the /api/v1/environment-document/ endpoint used by SDKs operating in local evaluation mode. Features stored as strings, booleans, or null values were not affected, and the Core API was not affected.

Our existing test suite did not catch the type change before it reached production. The issue was reported at 18:12 UTC, classified as P0 at 18:27 UTC, and we completed a rollback to the previous stable release by 18:36 UTC, restoring the expected behaviour.

What's Next?

We are fixing the underlying serialisation issue at its source before the next production deployment. The next release will preserve the expected string-typed behaviour for numeric features — no customer action is required.

To prevent this from happening again, we are adding integration tests that compare Core and Edge response types for the /api/v1/environment-document/ endpoint, introducing a stricter review process for any changes that affect serialisation or data types, and requiring that test failures are investigated at their root cause before a fix is applied.

Posted Mar 04, 2026 - 16:27 UTC

Resolved

Environment documents were being rendered with numeric values cast as numbers in the JSON responses, instead of the previous behaviour where the values were returned as strings. This caused issues for statically typed languages in particular.
Posted Mar 03, 2026 - 17:00 UTC