timehop / apns

A Go package to interface with the Apple Push Notification Service
https://godoc.org/github.com/timehop/apns
MIT License
185 stars 47 forks source link

Revisit Error Types #48

Closed taylortrimble closed 1 year ago

taylortrimble commented 9 years ago

There were some comments from #41 that hinted we may wish to revisit error types. I don't have anything specific in mind today, but recommend we review error handling specifically after some of the more major API changes we're considering.

nathany commented 9 years ago

3, #4, #30, #40

nathany commented 9 years ago
// Error captures the error response read from Apple's Push Notification server.
type Error struct {
    Status     uint8
    Identifier uint32
    Err          error
}

There are also various low-level socket errors that Read() may return if we don't get an error from Apple: