devinspector 2.0.2__tar.gz → 2.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {devinspector-2.0.2 → devinspector-2.0.3}/PKG-INFO +1 -1
- {devinspector-2.0.2 → devinspector-2.0.3}/devinspector/fastapi.py +5 -0
- {devinspector-2.0.2 → devinspector-2.0.3}/devinspector.egg-info/PKG-INFO +1 -1
- {devinspector-2.0.2 → devinspector-2.0.3}/pyproject.toml +1 -1
- {devinspector-2.0.2 → devinspector-2.0.3}/README.md +0 -0
- {devinspector-2.0.2 → devinspector-2.0.3}/devinspector/__init__.py +0 -0
- {devinspector-2.0.2 → devinspector-2.0.3}/devinspector/core.py +0 -0
- {devinspector-2.0.2 → devinspector-2.0.3}/devinspector/flask.py +0 -0
- {devinspector-2.0.2 → devinspector-2.0.3}/devinspector.egg-info/SOURCES.txt +0 -0
- {devinspector-2.0.2 → devinspector-2.0.3}/devinspector.egg-info/dependency_links.txt +0 -0
- {devinspector-2.0.2 → devinspector-2.0.3}/devinspector.egg-info/requires.txt +0 -0
- {devinspector-2.0.2 → devinspector-2.0.3}/devinspector.egg-info/top_level.txt +0 -0
- {devinspector-2.0.2 → devinspector-2.0.3}/setup.cfg +0 -0
|
@@ -14,11 +14,16 @@ class DevInspectorMiddleware(BaseHTTPMiddleware):
|
|
|
14
14
|
status_code = response.status_code
|
|
15
15
|
return response
|
|
16
16
|
except Exception as exc:
|
|
17
|
+
# Se for uma HTTPException do Starlette/FastAPI, extraímos o status code dela
|
|
18
|
+
if hasattr(exc, "status_code"):
|
|
19
|
+
status_code = exc.status_code
|
|
20
|
+
|
|
17
21
|
audit.capture_error(
|
|
18
22
|
exc,
|
|
19
23
|
metadata={
|
|
20
24
|
"path": request.url.path,
|
|
21
25
|
"method": request.method,
|
|
26
|
+
"statusCode": status_code,
|
|
22
27
|
},
|
|
23
28
|
)
|
|
24
29
|
raise exc
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|