mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-14 16:07:42 +00:00
8 lines
210 B
Go
8 lines
210 B
Go
package api
|
|
|
|
import "net/http"
|
|
|
|
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)
|
|
}
|