neko/server/internal/http/endpoint/error.go

18 lines
246 B
Go
Raw Normal View History

2020-01-13 21:05:38 +13:00
package endpoint
import "fmt"
type HandlerError struct {
Status int
Message string
Err error
}
func (e *HandlerError) Error() string {
if e.Err != nil {
return fmt.Sprintf("%s: %s", e.Message, e.Err.Error())
}
return e.Message
}