Use fallthrough in error switch to consolidate final error codes

This commit is contained in:
Devon Hudson 2023-05-19 10:06:44 -06:00
parent 210c3c7272
commit b1f17f78c8
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -176,7 +176,7 @@ func MakeJoin(
case spec.ErrorNotFound:
code = http.StatusNotFound
case spec.ErrorUnableToAuthoriseJoin:
code = http.StatusBadRequest
fallthrough // http.StatusBadRequest
case spec.ErrorBadJSON:
code = http.StatusBadRequest
}