Skip to content

Commit

Permalink
feat!: Use strings from spec for error and reason enums (#131)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Chakroun <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
  • Loading branch information
alxckn and beeme1mr authored May 1, 2024
1 parent 33843f9 commit cb2a4cd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
15 changes: 8 additions & 7 deletions lib/open_feature/sdk/provider/error_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ module OpenFeature
module SDK
module Provider
module ErrorCode
PROVIDER_NOT_READY = "Provider Not Ready"
FLAG_NOT_FOUND = "Flag Not Found"
PARSE_ERROR = "Parse Error"
TYPE_MISMATCH = "Type Mismatch"
TARGETING_KEY_MISSING = "Targeting Key Missing"
INVALID_CONTEXT = "Invalid Context"
GENERAL = "General"
PROVIDER_NOT_READY = "PROVIDER_NOT_READY"
FLAG_NOT_FOUND = "FLAG_NOT_FOUND"
PARSE_ERROR = "PARSE_ERROR"
TYPE_MISMATCH = "TYPE_MISMATCH"
TARGETING_KEY_MISSING = "TARGETING_KEY_MISSING"
INVALID_CONTEXT = "INVALID_CONTEXT"
PROVIDER_FATAL = "PROVIDER_FATAL"
GENERAL = "GENERAL"
end
end
end
Expand Down
18 changes: 9 additions & 9 deletions lib/open_feature/sdk/provider/reason.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ module OpenFeature
module SDK
module Provider
module Reason
STATIC = "Static"
DEFAULT = "Default"
TARGETING_MATCH = "Targeting Match"
SPLIT = "Split"
CACHED = "Cached"
DISABLED = "Disabled"
UNKNOWN = "Unknown"
STALE = "Stale"
ERROR = "Error"
STATIC = "STATIC"
DEFAULT = "DEFAULT"
TARGETING_MATCH = "TARGETING_MATCH"
SPLIT = "SPLIT"
CACHED = "CACHED"
DISABLED = "DISABLED"
UNKNOWN = "UNKNOWN"
STALE = "STALE"
ERROR = "ERROR"
end
end
end
Expand Down

0 comments on commit cb2a4cd

Please sign in to comment.