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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devinspector
3
- Version: 2.0.2
3
+ Version: 2.0.3
4
4
  Summary: SDK Python de monitoramento e auditoria em tempo real | DevInspector
5
5
  Author-email: DevInspector <suporte@devinspector.com.br>
6
6
  License: MIT
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devinspector
3
- Version: 2.0.2
3
+ Version: 2.0.3
4
4
  Summary: SDK Python de monitoramento e auditoria em tempo real | DevInspector
5
5
  Author-email: DevInspector <suporte@devinspector.com.br>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "devinspector"
7
- version = "2.0.2"
7
+ version = "2.0.3"
8
8
  description = "SDK Python de monitoramento e auditoria em tempo real | DevInspector"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
File without changes
File without changes