db: Refactor switch; NFC
This commit is contained in:
vecāks
a8eba1b0df
revīzija
104dbab335
|
@ -73,11 +73,7 @@ func ErrHTTPStatusCode(err error) int {
|
|||
switch err {
|
||||
case nil:
|
||||
return 0
|
||||
case ErrKeyInvalidChar:
|
||||
return http.StatusNotFound
|
||||
case ErrKeyInvalidLength:
|
||||
return http.StatusNotFound
|
||||
case ErrPasteDoesNotExist:
|
||||
case ErrKeyInvalidChar, ErrKeyInvalidLength, ErrPasteDoesNotExist:
|
||||
return http.StatusNotFound
|
||||
}
|
||||
return http.StatusInternalServerError
|
||||
|
|
Notiek ielāde…
Atsaukties uz šo jaunā problēmā