Closed vnodecg closed 8 years ago
Right now some errors that could occur don't conform to the Error type. Such as an error building a request https://github.com/RobotsAndPencils/buford/blob/master/push/service.go#L70 or making an HTTP request: https://github.com/RobotsAndPencils/buford/blob/master/push/service.go#L77
You can use a type assertion to get the push.Error
type back:
https://github.com/RobotsAndPencils/buford#error-responses
I was trying to access the timestamp. All I get is error
Take a look at type assertions.
if e, ok := err.(*push.Error); ok {
log.Println(e.Timestamp)
}
in #97 return type should be
Error
not builtinerror
.With return type
Error
user will have options like getting timestamp of unregistered error