mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 02:23:10 -06:00
Use fallthrough in error switch to consolidate final error codes
This commit is contained in:
parent
210c3c7272
commit
b1f17f78c8
|
|
@ -176,7 +176,7 @@ func MakeJoin(
|
||||||
case spec.ErrorNotFound:
|
case spec.ErrorNotFound:
|
||||||
code = http.StatusNotFound
|
code = http.StatusNotFound
|
||||||
case spec.ErrorUnableToAuthoriseJoin:
|
case spec.ErrorUnableToAuthoriseJoin:
|
||||||
code = http.StatusBadRequest
|
fallthrough // http.StatusBadRequest
|
||||||
case spec.ErrorBadJSON:
|
case spec.ErrorBadJSON:
|
||||||
code = http.StatusBadRequest
|
code = http.StatusBadRequest
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue