Skip to content

Commit 73e69a3

Browse files
author
s.kazemi
committed
fix: exception utils error assertion
1 parent 64728e4 commit 73e69a3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

features/exception_utils.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Feature: Exception Utilities
1818
Scenario: Handle a gRPC exception
1919
Given a gRPC exception "BaseError"
2020
When gRPC exception is handled
21-
Then the response should have gRPC status "UNKNOWN"
21+
Then the response should have gRPC status "INTERNAL"
2222

2323
Scenario: Generate FastAPI exception responses
2424
Given a list of FastAPI errors ["InvalidPhoneNumberError", "NotFoundError"]

features/steps/exception_utils_steps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ def step_when_grpc_exception_is_handled(context):
100100
scenario_context.store("grpc_code", grpc_code)
101101

102102

103-
@then('the response should have gRPC status "UNKNOWN"')
104-
def step_then_grpc_status_should_be_unknown(context):
103+
@then('the response should have gRPC status "INTERNAL"')
104+
def step_then_grpc_status_should_be_internal(context):
105105
scenario_context = get_current_scenario_context(context)
106106
grpc_code = scenario_context.get("grpc_code")
107-
assert grpc_code == StatusCode.UNKNOWN.value[0]
107+
assert grpc_code == StatusCode.INTERNAL
108108

109109

110110
@given("a list of FastAPI errors {exception_names}")

0 commit comments

Comments
 (0)