TLS failures are masked by AttributeError when API exception body is None
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start with gen/templates/api_client.mustache and the generated api_client.py exception-body decoding described in the issue. Review the linked signed fix and its tests to understand the reported behavior; verify that None and string bodies are handled while byte bodies retain UTF-8 decoding. The issue reports five public AssetsApi regression and control tests passing, with broader suite limitations noted.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
A TLS transport error through AssetsApi.list_assets() is replaced by AttributeError: 'NoneType' object has no attribute 'decode', obscuring the intended SDK ApiException and its diagnostic reason. The REST layer constructs ApiException(status=0, reason=...) without a response body; the API client unconditionally decodes e.body.
Offline reproduction
from unittest.mock import patch
import urllib3
from mux_python import ApiClient, AssetsApi
with ApiClient() as client:
with patch.object(client.rest_client.pool_manager, 'request',
side_effect=urllib3.exceptions.SSLError('certificate failed')):
AssetsApi(client).list_assets()
Expected: ApiException with status 0 and the SSL diagnostic. Actual: AttributeError at api_client.py's exception-body decoding. Already-decoded string bodies also fail there; byte bodies should retain UTF-8 decoding.
Following the README's issue-only workflow, I published a tested fork rather than opening a PR: signed fix and tests. It updates both gen/templates/api_client.mustache and the generated client to decode only byte bodies.
Validation and limits
Five tests exercise public AssetsApi calls: three regressions fail and two byte-body controls pass before; all five pass after. Broader suite, excluding an existing missing-model import: 274 pass / 5 fail after versus 269 pass / the same five fail on unchanged production code without the new tests. The missing list_real_time_dimensions_response_data model is absent from HEAD. Python 3.12 and pytest 8; the pinned pytest 4 is incompatible with that runtime. Changed files compile; diff check passes. No live Mux requests or full Python matrix run.
Prepared with AI assistance; maintainer review pending.
- Lingua principale
- Python
- Stelle
- 68
- Fork
- 17
- Merge medio
- 10h 50m
- PR unite (30g)
- 3
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di muxinc/mux-python
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 53/100
muxinc/mux-python#54 · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
muxinc/mux-python#53 ·
-
Add Mux webhook verificationApertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
muxinc/mux-python#38 · 7 commenti · 4 reazioni ·
Tutte le issue di muxinc/mux-python
Issue simili
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount dueForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 79/100
developmentseed/titiler-covjson#164 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
awslabs/visual-asset-management-system#2164 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
MakazhanAlpamys/Soup#3589 ·
I maintainer di solito rispondono entro 1 giorno
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno