omnect-device-service reports the factory-reset result in a new shape since omnect/omnect-device-service#207 (feature version factory_reset 3 -> 4). The current omnect-ui type cannot parse it.
New shape published on FactoryResetV1
{
"keys": ["network", "firewall", "certificates"],
"result": {
"status": 0,
"error": null,
"context": null,
"paths": ["network"],
"data_wiped": true
}
}
status is a u32: 0 success, 1 invalid request, 2 error, 3 configuration error, 4 warning (reset ok, but a partition needed a second format attempt). A code unknown to ODS is reported as 4294967295.
error and context are null unless the reset reported a problem.
paths lists the preserved paths.
data_wiped is new: true once the reset started wiping data; on status 2 it distinguishes a safe abort from a failure after data was already wiped.
Mismatches in omnect-ui (src/app/src/types/ods.rs)
|
ODS publishes |
omnect-ui expects |
error |
null on success |
required String |
status |
u32, 0..=4 or 4294967295 |
#[repr(u8)] enum with 0..=3 only |
data_wiped |
always present |
not in the struct (ignored, ok) |
Effect
Every factory-reset result fails to deserialize in parse_ods_update!; the UI shows a parse error instead of the result. This includes the normal successful reset.
Task
error, context: Option<String>
status: #[repr(u32)], add Warning = 4 and a #[serde(other)] catch-all
- optionally show
data_wiped
omnect-device-service reports the factory-reset result in a new shape since omnect/omnect-device-service#207 (feature version
factory_reset3 -> 4). The current omnect-ui type cannot parse it.New shape published on
FactoryResetV1{ "keys": ["network", "firewall", "certificates"], "result": { "status": 0, "error": null, "context": null, "paths": ["network"], "data_wiped": true } }statusis a u32:0success,1invalid request,2error,3configuration error,4warning (reset ok, but a partition needed a second format attempt). A code unknown to ODS is reported as4294967295.errorandcontextarenullunless the reset reported a problem.pathslists the preserved paths.data_wipedis new:trueonce the reset started wiping data; onstatus2it distinguishes a safe abort from a failure after data was already wiped.Mismatches in omnect-ui (
src/app/src/types/ods.rs)errornullon successStringstatus0..=4or4294967295#[repr(u8)]enum with0..=3onlydata_wipedEffect
Every factory-reset result fails to deserialize in
parse_ods_update!; the UI shows a parse error instead of the result. This includes the normal successful reset.Task
error,context:Option<String>status:#[repr(u32)], addWarning = 4and a#[serde(other)]catch-alldata_wiped