validateBranch returned an untyped error for a name rejected by git check-ref-format, so toAPIError fell through to INTERNAL_ERROR 500. Add a ports.ErrWorkspaceBranchInvalid sentinel (mirroring the not-fetched / checked-out-elsewhere ones), wrap it in validateBranch, and map it to INVALID_BRANCH (400). Completes the residual of #152 Bug 3, which typed the not-fetched and checked-out-elsewhere cases but left the invalid-format case collapsing to 500. Closes #212 |
||
|---|---|---|
| .. | ||
| cmd | ||
| internal | ||
| .golangci.yml | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| sqlc.yaml | ||