Jelajahi Sumber

Handle storage full error (#1958)

Co-authored-by: あく <alleteam@gmail.com>
Georgii Surkov 3 tahun lalu
induk
melakukan
c417d467f7
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      applications/services/rpc/rpc_storage.c

+ 4 - 0
applications/services/rpc/rpc_storage.c

@@ -405,6 +405,10 @@ static void rpc_system_storage_write_process(const PB_Main* request, void* conte
     if(!fs_operation_success) {
         send_response = true;
         command_status = rpc_system_storage_get_file_error(file);
+        if(command_status == PB_CommandStatus_OK) {
+            // Report errors not handled by underlying APIs
+            command_status = PB_CommandStatus_ERROR_STORAGE_INTERNAL;
+        }
     }
 
     if(send_response) {