Skip to content

Add $feature_flags_error to React-Native SDK #2879

@dustinbyrne

Description

@dustinbyrne

Goal: Port flag error tracking to React Native by including the $feature_flag_error property in $feature_flag_called events. This property exists to help debug flag evaluation failures.

The value of the property reflects any error(s) that occurred while retrieving remote evaluation results from the /flags endpoint.

Other SDKs report properties such as:

  • errors_while_computing_flags - Server response body JSON included errorsWhileComputingFlags=true
  • flag_missing - Requested flag not in API response
  • quota_limited - Rate/quota limit exceeded
  • timeout - Request timed out
  • connection_error - Network connectivity issue
  • api_error_{status} - Server error with HTTP status code (e.g., api_error_500)
  • unknown_error - Unexpected exceptions

Multiple relevant errors are joined with commas (e.g., errors_while_computing_flags,flag_missing).

This feature has been implemented in a number of SDKs already for reference:

Related to https://posthoghelp.zendesk.com/agent/tickets/46332

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions