updates
This commit is contained in:
@@ -104,6 +104,8 @@ func ErrorToHTTPCode(err error) int {
|
||||
switch {
|
||||
case os.IsPermission(err):
|
||||
return http.StatusForbidden
|
||||
case os.IsNotExist(err):
|
||||
return http.StatusNotFound
|
||||
case os.IsExist(err):
|
||||
return http.StatusGone
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user