mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 13:17:42 +00:00
13 lines
289 B
Go
13 lines
289 B
Go
package api
|
|
|
|
import (
|
|
"errors"
|
|
"net/http"
|
|
)
|
|
|
|
var ErrDuplicateAPNSToken = errors.New("duplicate apns token")
|
|
|
|
func (a *api) errorResponse(w http.ResponseWriter, _ *http.Request, status int, err error) {
|
|
w.Header().Set("X-Apollo-Error", err.Error())
|
|
http.Error(w, err.Error(), status)
|
|
}
|