Skip to content

Commit cb2a4cd

Browse files
alxcknbeeme1mr
andauthored
feat!: Use strings from spec for error and reason enums (#131)
Signed-off-by: Alexandre Chakroun <[email protected]> Co-authored-by: Michael Beemer <[email protected]>
1 parent 33843f9 commit cb2a4cd

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

lib/open_feature/sdk/provider/error_code.rb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ module OpenFeature
22
module SDK
33
module Provider
44
module ErrorCode
5-
PROVIDER_NOT_READY = "Provider Not Ready"
6-
FLAG_NOT_FOUND = "Flag Not Found"
7-
PARSE_ERROR = "Parse Error"
8-
TYPE_MISMATCH = "Type Mismatch"
9-
TARGETING_KEY_MISSING = "Targeting Key Missing"
10-
INVALID_CONTEXT = "Invalid Context"
11-
GENERAL = "General"
5+
PROVIDER_NOT_READY = "PROVIDER_NOT_READY"
6+
FLAG_NOT_FOUND = "FLAG_NOT_FOUND"
7+
PARSE_ERROR = "PARSE_ERROR"
8+
TYPE_MISMATCH = "TYPE_MISMATCH"
9+
TARGETING_KEY_MISSING = "TARGETING_KEY_MISSING"
10+
INVALID_CONTEXT = "INVALID_CONTEXT"
11+
PROVIDER_FATAL = "PROVIDER_FATAL"
12+
GENERAL = "GENERAL"
1213
end
1314
end
1415
end

lib/open_feature/sdk/provider/reason.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ module OpenFeature
22
module SDK
33
module Provider
44
module Reason
5-
STATIC = "Static"
6-
DEFAULT = "Default"
7-
TARGETING_MATCH = "Targeting Match"
8-
SPLIT = "Split"
9-
CACHED = "Cached"
10-
DISABLED = "Disabled"
11-
UNKNOWN = "Unknown"
12-
STALE = "Stale"
13-
ERROR = "Error"
5+
STATIC = "STATIC"
6+
DEFAULT = "DEFAULT"
7+
TARGETING_MATCH = "TARGETING_MATCH"
8+
SPLIT = "SPLIT"
9+
CACHED = "CACHED"
10+
DISABLED = "DISABLED"
11+
UNKNOWN = "UNKNOWN"
12+
STALE = "STALE"
13+
ERROR = "ERROR"
1414
end
1515
end
1616
end

0 commit comments

Comments
 (0)