Initial commit
This commit is contained in:
14
app/utils/error/http.go
Normal file
14
app/utils/error/http.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package error
|
||||
|
||||
type HTTPError struct {
|
||||
Code int `json:"code"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
func (e *HTTPError) Error() string {
|
||||
return e.Message
|
||||
}
|
||||
|
||||
func (e *HTTPError) StatusCode() int {
|
||||
return e.Code
|
||||
}
|
||||
Reference in New Issue
Block a user