From a71996e41ea256247006f9d9ca8391f00d78194d Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Wed, 18 Nov 2026 16:49:41 -0700 Subject: [PATCH] commands: use a typed field for direct command failure message Previously we were overriding "error" in context which is easy to conflict with a user provided message. Signed-off-by: Matt Klein --- src/bitdrift_public/protobuf/client/v1/api.proto | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bitdrift_public/protobuf/client/v1/api.proto b/src/bitdrift_public/protobuf/client/v1/api.proto index 8489978..481f911 100644 --- a/src/bitdrift_public/protobuf/client/v1/api.proto +++ b/src/bitdrift_public/protobuf/client/v1/api.proto @@ -879,8 +879,12 @@ message DeviceCommandUpdate { // Reports that command execution could not be completed. message Failed { - // Optional structured context supplied with the failed command result. + // Optional application context supplied with the failed command result. Older SDKs put + // the failure message in the `error` field when `failure_message` is absent. DeviceCommandResultContext context = 1; + + // The human-readable failure message, separate from application context. + optional string failure_message = 2; } // The command ID from the corresponding DeviceCommandRequest.