forked from ebhomengo/niki
25 lines
381 B
Go
25 lines
381 B
Go
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)
|
|
}
|