18 lines
246 B
Go
Raw Normal View History

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