Class: PostHog::FeatureFlagError Private

Inherits:
Object
  • Object
show all
Defined in:
lib/posthog/feature_flag_error.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Error type constants for the $feature_flag_error property.

These values are sent in analytics events to track flag evaluation failures. They should not be changed without considering impact on existing dashboards and queries that filter on these values.

Error values:

ERRORS_WHILE_COMPUTING: Server returned 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
UNKNOWN_ERROR: Unexpected exceptions

For API errors with status codes, use the api_error() method which returns a string like “api_error_500”.

Constant Summary collapse

ERRORS_WHILE_COMPUTING =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'errors_while_computing_flags'
FLAG_MISSING =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'flag_missing'
QUOTA_LIMITED =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'quota_limited'
TIMEOUT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'timeout'
CONNECTION_ERROR =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'connection_error'
UNKNOWN_ERROR =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'unknown_error'

Class Method Summary collapse

Class Method Details

.api_error(status) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Generate API error string with status code.

Parameters:

  • status (Integer, String)

    The HTTP status code

Returns:

  • (String)

    Error string in format “api_error_STATUS”



33
34
35
# File 'lib/posthog/feature_flag_error.rb', line 33

def self.api_error(status)
  "api_error_#{status.to_s.downcase}"
end