forge label create exits 22 without diagnostics #100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story: So that I can fix label setup failures without guessing,
forge label createshould report useful API or validation diagnostics whenever label creation is rejected.Part of the "Forge / workspace CLI tooling" arc.
Bug
forge label createcan fail with exit code 22 and print no error message, leaving the operator with no actionable cause.Observed while trying to create a priority label on a repository with no existing labels:
Result:
22A prior variant without the leading
#in the color also failed silently:Authentication was valid at the time, and
forge label liststill reported no labels afterward.Expected behavior
If the Forgejo API rejects label creation,
forgeshould print the HTTP status and response body, or a concise decoded error message. If the failure is client-side argument validation, it should report the invalid field.At minimum, a failing
forge label createshould not exit nonzero with no diagnostics.Acceptance criteria
forge label create ...failures include enough context to distinguish auth/permission, validation, route, and server errors.