Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ld_openfeature/impl/details_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def __error_kind_to_code(error_kind: Optional[str]) -> ErrorCode:
return ErrorCode.PARSE_ERROR
elif error_kind == 'USER_NOT_SPECIFIED':
return ErrorCode.TARGETING_KEY_MISSING
elif error_kind == 'WRONG_TYPE':
return ErrorCode.TYPE_MISMATCH

# NOTE: EXCEPTION_ERROR intentionally omitted

Expand Down
1 change: 1 addition & 0 deletions tests/impl/test_details_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def test_ld_to_openfeature_kind_mappings(detail_kind: str, reason: Union[str, Re
pytest.param('FLAG_NOT_FOUND', ErrorCode.FLAG_NOT_FOUND),
pytest.param('MALFORMED_FLAG', ErrorCode.PARSE_ERROR),
pytest.param('USER_NOT_SPECIFIED', ErrorCode.TARGETING_KEY_MISSING),
pytest.param('WRONG_TYPE', ErrorCode.TYPE_MISMATCH),
pytest.param('EXCEPTION_ERROR', ErrorCode.GENERAL),
],
)
Expand Down
Loading