json: switch backup and restore errors from string to struct types

This keeps backwards compatibility with the previous empty structs.
And maybe we'd want to put other fields into the inner struct later,
rather than the outer message.
This commit is contained in:
Michael Terry
2024-08-03 15:29:10 -04:00
parent a376323331
commit 88f59fc2d6
5 changed files with 36 additions and 15 deletions

View File

@@ -139,7 +139,7 @@ Error
+----------------------+-------------------------------------------+
| ``message_type`` | Always "error" |
+----------------------+-------------------------------------------+
| ``error`` | Error message |
| ``error.message`` | Error message |
+----------------------+-------------------------------------------+
| ``during`` | What restic was trying to do |
+----------------------+-------------------------------------------+
@@ -539,6 +539,19 @@ Status
|``bytes_skipped`` | Total size of skipped files |
+----------------------+------------------------------------------------------------+
Error
^^^^^
+----------------------+-------------------------------------------+
| ``message_type`` | Always "error" |
+----------------------+-------------------------------------------+
| ``error.message`` | Error message |
+----------------------+-------------------------------------------+
| ``during`` | Always "restore" |
+----------------------+-------------------------------------------+
| ``item`` | Usually, the path of the problematic file |
+----------------------+-------------------------------------------+
Verbose Status
^^^^^^^^^^^^^^