MCPcopy Create free account
hub / github.com/dropbox/dbxcli / newJSONErrorResponse

Function newJSONErrorResponse

cmd/json_output.go:53–65  ·  view source on GitHub ↗
(cmd *cobra.Command, err error)

Source from the content-addressed store, hash-verified

51const jsonSchemaVersion = "1"
52
53func newJSONErrorResponse(cmd *cobra.Command, err error) jsonErrorResponse {
54 return jsonErrorResponse{
55 OK: false,
56 SchemaVersion: jsonSchemaVersion,
57 Command: jsonCommandPath(cmd),
58 Error: jsonError{
59 Message: err.Error(),
60 Code: jsonErrorCode(err),
61 Details: jsonErrorDetailsForCommand(cmd, err),
62 },
63 Warnings: jsonCommandWarnings(cmd),
64 }
65}
66
67func newJSONOperationOutput(input any, results []jsonOperationResult, warnings []jsonWarning) jsonOperationOutput {
68 return jsonOperationOutput{

Calls 5

jsonCommandPathFunction · 0.85
jsonErrorCodeFunction · 0.85
jsonCommandWarningsFunction · 0.85
ErrorMethod · 0.45