Skip to content

Commit 9ce9069

Browse files
committed
Merge branch 'master' into potel-base
2 parents 96c03c9 + 2d8ae87 commit 9ce9069

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- name: Get auth token
2222
id: token
23-
uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
23+
uses: actions/create-github-app-token@af35edadc00be37caa72ed9f3e6d5f7801bfdf09 # v1.11.7
2424
with:
2525
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2626
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}

sentry_sdk/integrations/django/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def parsed_body(self):
587587
# type: () -> Optional[Dict[str, Any]]
588588
try:
589589
return self.request.data
590-
except AttributeError:
590+
except Exception:
591591
return RequestExtractor.parsed_body(self)
592592

593593

sentry_sdk/spotlight.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def capture_envelope(self, envelope):
8282

8383
class SpotlightMiddleware(MiddlewareMixin): # type: ignore[misc]
8484
_spotlight_script = None # type: Optional[str]
85+
_spotlight_url = None # type: Optional[str]
8586

8687
def __init__(self, get_response):
8788
# type: (Self, Callable[..., HttpResponse]) -> None
@@ -103,7 +104,7 @@ def __init__(self, get_response):
103104
@property
104105
def spotlight_script(self):
105106
# type: (Self) -> Optional[str]
106-
if self._spotlight_script is None:
107+
if self._spotlight_url is not None and self._spotlight_script is None:
107108
try:
108109
spotlight_js_url = urllib.parse.urljoin(
109110
self._spotlight_url, SPOTLIGHT_JS_ENTRY_PATH
@@ -173,7 +174,7 @@ def process_response(self, _request, response):
173174

174175
def process_exception(self, _request, exception):
175176
# type: (Self, HttpRequest, Exception) -> Optional[HttpResponseServerError]
176-
if not settings.DEBUG:
177+
if not settings.DEBUG or not self._spotlight_url:
177178
return None
178179

179180
try:

0 commit comments

Comments
 (0)