post_device_status discards all control errors and always returns 204

Aperta
#33 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust
Ambito
api, backend

Direzione di ricerca

Read crates/api/src/handlers.rs:98-113 and compare the control error handling with lib.rs:204-208. Trace how handler errors become HTTP responses, then check how PoddControl::send reports a closed command channel. Done when failed control sends are logged or return a 5xx instead of 204; no test file is named in the issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Every control call in post_device_status is fired with let _ = … (crates/api/src/handlers.rs:98-113): set_power, set_target_temp, clear_alarm, prime, apply_device_settings. PoddControl::send returns Err only when the command mpsc is closed — i.e. the control core has died (exactly the failure mode lib.rs:204-208 was hardened against). In that state the handler still returns 204 No Content, so the UI believes a temperature/alarm change was applied when nothing received it. At minimum log these errors; ideally surface a 5xx when the command channel is gone.


Filed from a repo-wide code audit (working tree at bcad746).

Lingua principale
Rust
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GoogleBot42/podd

Tutte le issue di GoogleBot42/podd

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.