helper/resource: Implement resource-wide NotFoundError

pull/5444/head
Radek Simko 10 years ago
parent a1f7789161
commit fd2fcaf1d5

@ -0,0 +1,21 @@
package resource
type NotFoundError struct {
LastError error
LastRequest interface{}
LastResponse interface{}
Message string
Retries int
}
func (e *NotFoundError) Error() string {
if e.Message != "" {
return e.Message
}
return "couldn't find resource"
}
func NewNotFoundError(err string) *NotFoundError {
return &NotFoundError{Message: err}
}
Loading…
Cancel
Save