Skip to content

Commit f32423a

Browse files
committed
fix unit test for BaseGatewayException
1 parent 1f82963 commit f32423a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

localstack-core/localstack/services/apigateway/next_gen/execute_api/gateway_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class BaseGatewayException(Exception):
3939
"""
4040

4141
message: str = "Unimplemented Response"
42-
type: GatewayResponseType
42+
type: GatewayResponseType = None
4343
status_code: int | str = None
4444
code: str = ""
4545

@@ -48,7 +48,7 @@ def __init__(self, message: str = None, status_code: int | str = None):
4848
self.message = message
4949
if status_code is not None:
5050
self.status_code = status_code
51-
elif self.status_code is None:
51+
elif self.status_code is None and self.type:
5252
# Fallback to the default value
5353
self.status_code = GatewayResponseCode[self.type]
5454

0 commit comments

Comments
 (0)