You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Structured success output is rolling out command by command. Currently migrated commands are `account`, `du`, `ls`, `search`, `revs`, `cp`, `mv`, `put`, `get`, `share-link create`, `share-link list`, `share-link info`, `share-link update`, `share-link revoke`, `share-link download`, `mkdir`, `rm`, and `restore`. Commands that have not been migrated return a JSON error whose `error.message` is `structured output is not supported for this command yet` when used with `--output=json`.
158
158
159
-
Command results are written to stdout. Status, progress, warnings, diagnostics, and verbose logs are written to stderr.
159
+
Command results and JSON errors are written to stdout. Status, progress, human-facing warnings, diagnostics, and verbose logs are written to stderr. JSON errors include a `warnings` array for machine-actionable warnings; it is `[]` when no warnings are present. New operation-style JSON payloads should use the same `warnings` field.
160
160
161
161
Successful JSON responses are command-specific. Commands that operate on one path usually return an `input` object and a `result` metadata object:
162
162
@@ -337,7 +337,8 @@ In JSON mode, command errors are written to stdout as JSON, including errors fro
337
337
"error": {
338
338
"message": "path exists and is not a folder: /old-file.txt",
339
339
"code": "path_conflict"
340
-
}
340
+
},
341
+
"warnings": []
341
342
}
342
343
```
343
344
@@ -506,7 +507,7 @@ Dropbox account, team, and folder policies can reject shared-link settings such
506
507
507
508
`share-link download` writes to the metadata filename when `target` is omitted. Use `--path` to download a single file inside a folder shared link. Use `-` as the target to write file bytes to stdout. Folder shared links require `--recursive` and cannot be written to stdout.
508
509
509
-
New and changed commands should write command results to stdout. Status, progress, warnings, diagnostics, and verbose logs should go to stderr.
510
+
New and changed commands should write command results to stdout. Status, progress, human-facing warnings, diagnostics, and verbose logs should go to stderr. Machine-actionable JSON warnings should use the `warnings` array.
0 commit comments