Skip to content

Commit f0be9b7

Browse files
committed
dont broadly catch exceptions
1 parent b0b411c commit f0be9b7

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/sentry/integrations/jira/webhooks/installed.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ def post(self, request: Request, *args, **kwargs) -> Response:
8282
return self.respond(
8383
{"detail": "Could not decode JWT token"}, status=status.HTTP_400_BAD_REQUEST
8484
)
85-
except Exception:
86-
lifecycle.record_halt("JWT authentication failed")
87-
return self.respond(
88-
{"detail": "JWT authentication failed"}, status=status.HTTP_400_BAD_REQUEST
89-
)
9085

9186
data = JiraIntegrationProvider().build_integration(state)
9287
integration = ensure_integration(self.provider, data)

tests/sentry/integrations/jira/test_installed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def test_no_claims(self, mock_authenticate_asymmetric_jwt: MagicMock) -> None:
109109
self.get_error_response(
110110
**self.body(),
111111
extra_headers=dict(HTTP_AUTHORIZATION="JWT " + self.jwt_token_cdn()),
112-
status_code=status.HTTP_400_BAD_REQUEST,
112+
status_code=status.HTTP_409_CONFLICT,
113113
)
114114

115115
@patch(

0 commit comments

Comments
 (0)