diff --git a/internal/infra/errs/errs_test.go b/internal/infra/errs/errs_test.go index 27f2837..a3cb1ed 100644 --- a/internal/infra/errs/errs_test.go +++ b/internal/infra/errs/errs_test.go @@ -29,15 +29,18 @@ func TestWrap_PreservesCause(t *testing.T) { func TestHTTPStatus(t *testing.T) { cases := map[Code]int{ - CodeInvalidInput: http.StatusBadRequest, - CodeUnauthorized: http.StatusUnauthorized, - CodeForbidden: http.StatusForbidden, - CodeNotFound: http.StatusNotFound, - CodeConflict: http.StatusConflict, - CodeRateLimited: http.StatusTooManyRequests, - CodeUpstream: http.StatusBadGateway, - CodeUnavailable: http.StatusServiceUnavailable, - CodeInternal: http.StatusInternalServerError, + CodeInvalidInput: http.StatusBadRequest, + CodeUnauthorized: http.StatusUnauthorized, + CodeForbidden: http.StatusForbidden, + CodeNotFound: http.StatusNotFound, + CodeConflict: http.StatusConflict, + CodeProjectSlugTaken: http.StatusConflict, + CodeProjectArchived: http.StatusConflict, + CodeRequirementClosed: http.StatusConflict, + CodeRateLimited: http.StatusTooManyRequests, + CodeUpstream: http.StatusBadGateway, + CodeUnavailable: http.StatusServiceUnavailable, + CodeInternal: http.StatusInternalServerError, } for code, want := range cases { require.Equal(t, want, HTTPStatus(code), "code=%s", code)