db: Refactor switch; NFC
这个提交包含在:
父节点
a8eba1b0df
当前提交
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
|
||||
|
|
正在加载...
在新工单中引用