mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 23:47:44 +00:00
9 lines
224 B
Go
9 lines
224 B
Go
package api
|
|
|
|
import "net/http"
|
|
|
|
func (a *api) errorResponse(w http.ResponseWriter, r *http.Request, status int, message string) {
|
|
w.Header().Set("X-Apollo-Error", message)
|
|
w.WriteHeader(status)
|
|
w.Write([]byte(message))
|
|
}
|