Skip to content

gh agent-task create: swallows API errors #12069

@BagToad

Description

@BagToad

Describe the bug

gh agent-task create swallows API errors.

Steps to reproduce the behavior

Run a gh agent-task create command that fails, for example for permission reasons.

Expected vs actual behavior

We should show this error

Logs

API debug enabled

Creating agent task in owner/repo... ⣷< HTTP/2.0 404 Not Found
<snip>

{"message":"specified custom agent not found","errors":null}

* Request took 1.810757644s
failed to create job: 404 Not Found

As you can see, we only print the status text. We should print the helpful API error.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggh-agent-taskRelated to gh agent-task command setp3Affects a small number of users or is largely cosmetic

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions