Browse Source

db: Refactor switch; NFC

master
Daan Sprenkels 4 months ago
parent
commit
104dbab335
1 changed files with 1 additions and 5 deletions
  1. +1
    -5
      internal/db/paste.go

+ 1
- 5
internal/db/paste.go View File

@@ -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


Loading…
Cancel
Save