Commit 6b83643
committed
fix(ffe): Correct error code mapping and enforce ERROR reason for non-zero error codes
- Fix errorCodeToTag() to match actual Rust constants:
1=ERROR_TYPE_MISMATCH→type_mismatch, 2=ERROR_CONFIG_PARSE→parse_error,
3=ERROR_FLAG_UNRECOGNIZED→flag_not_found (was transposed)
- Per OpenFeature spec, force reason=ERROR for any non-zero error_code.
FlagUnrecognizedOrDisabled returns REASON_DEFAULT from the Rust layer
but must be reported as ERROR to callers.1 parent dea34a4 commit 6b83643
2 files changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
| |||
0 commit comments