forked from ebhomengo/niki
1
0
Fork 0
niki/vendor/github.com/kavenegar/kavenegar-go/errors.go

25 lines
381 B
Go
Raw Normal View History

2024-08-29 03:26:59 +00:00
package kavenegar
import (
"fmt"
)
type APIError struct {
Status int
Message string
Err error
}
type HTTPError struct {
Status int
Message string
Err error
}
func (e *APIError) Error() string {
return fmt.Sprintf("APIError[%d] : %s", e.Status, e.Message)
}
func (e *HTTPError) Error() string {
return fmt.Sprintf("HTTPError[%d] : %s", e.Status, e.Message)
}