Open Bug 1595638 Opened 6 years ago

Improve client-shell error messages

Categories

(Taskcluster :: Services, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

People

(Reporter: dustin, Unassigned, Mentored)

Details

dustin@jemison ~ $ taskcluster api queue cancelTask BnTeGj9BRxymQP70fZgBjQ
Error: Request failed: Non-2xx StatusCode: 403 received in 1 attempts
{
  "code": "InsufficientScopes",
  "message": "Client ID github/28673|djmitche/foo does not have sufficient scopes and is missing the following scopes:\n\n```\n{\n  \"AnyOf\": [\n    \"queue:cancel-task:-/HcQGyZZ2TESwPM8Gp8yl4g/BnTeGj9BRxymQP70fZgBjQ\",\n    {\n      \"AllOf\": [\n        \"queue:cancel-task\",\n        \"assume:scheduler-id:-/HcQGyZZ2TESwPM8Gp8yl4g\"\n      ]\n    }\n  ]\n}\n```\n\nThis request requires the client to satisfy the following scope expression:\n\n```\n{\n  \"AnyOf\": [\n    \"queue:cancel-task:-/HcQGyZZ2TESwPM8Gp8yl4g/BnTeGj9BRxymQP70fZgBjQ\",\n    {\n      \"AllOf\": [\n        \"queue:cancel-task\",\n        \"assume:scheduler-id:-/HcQGyZZ2TESwPM8Gp8yl4g\"\n      ]\n    }\n  ]\n}\n```\n\n---\n\n* method:     cancelTask\n* errorCode:  InsufficientScopes\n* statusCode: 403\n* time:       2019-11-12T00:50:27.112Z",
  "requestInfo": {
    "method": "cancelTask",
    "params": {
      "taskId": "BnTeGj9BRxymQP70fZgBjQ"
    },
    "payload": {},
    "time": "2019-11-12T00:50:27.112Z"
  }
}
Usage:
  taskcluster api queue cancelTask <taskId> [flags]

Flags:
  -h, --help   help for cancelTask

Global Flags:
  -o, --output string   Output file (default "-")

trying to decipher that \n-containing message is pretty awful. Let's do better.

You need to log in before you can comment on or make changes to this bug.