Files
supervisor/tests/api
Mike Degatano 96b92b95fa Split disable/delete network apply helpers, add translatable host network errors
Replace the destructive_disable-argument-driven _apply_disable() with two
dedicated helpers, _apply_delete() and _apply_deactivate(), so log messages
and error handling can be specific to each path instead of sharing generic
wording.

Give every error apply_changes() can raise an error_key plus a status code
matching who is actually responsible: bad client-supplied connection
settings stay 400 (activation failed/timed out), a request to update an
interface that does not exist or is disabled is 404, and DBus-call
failures that aren't caused by anything the caller sent become 500
(APIUnknownSupervisorError) instead of the previous blanket 400.

Failures that wrap a DBus error no longer interpolate the raw exception
text into the client-facing message, since that unbounded text cannot be
translated. Instead the full error is logged at ERROR level exactly as
before, and the raised exception carries only the interface name.
2026-09-12 02:28:39 +00:00
..