adjust errors and logger
This commit is contained in:
11
internal/errors/http_errors.go
Normal file
11
internal/errors/http_errors.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package errors
|
||||
|
||||
import "net/http"
|
||||
|
||||
func InvalidArg(arg string) error {
|
||||
return Newf(nil, http.StatusBadRequest, "invalid argument: %s", arg)
|
||||
}
|
||||
|
||||
func HTTPShutDown(cause error) error {
|
||||
return Newf(cause, http.StatusInternalServerError, "http server shut down")
|
||||
}
|
||||
Reference in New Issue
Block a user