Skip to content

Commit

Permalink
Remove unnecessary elif
Browse files Browse the repository at this point in the history
  • Loading branch information
JonatanMartens committed Jul 30, 2023
1 parent 11e8fee commit bd8d0c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyzeebe/grpc_internals/zeebe_adapter_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ async def _close(self):
def _create_pyzeebe_error_from_grpc_error(grpc_error: grpc.aio.AioRpcError) -> PyZeebeError:
if is_error_status(grpc_error, grpc.StatusCode.RESOURCE_EXHAUSTED):
return ZeebeBackPressureError()
elif is_error_status(grpc_error, grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.CANCELLED):
if is_error_status(grpc_error, grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.CANCELLED):
return ZeebeGatewayUnavailableError()
elif is_error_status(grpc_error, grpc.StatusCode.INTERNAL):
if is_error_status(grpc_error, grpc.StatusCode.INTERNAL):
return ZeebeInternalError()
return UnkownGrpcStatusCodeError(grpc_error)

0 comments on commit bd8d0c2

Please sign in to comment.