apollo-backend/internal/api/errors.go

9 lines
207 B
Go
Raw Permalink Normal View History

package api
import "net/http"
func (a *api) errorResponse(w http.ResponseWriter, r *http.Request, status int, message string) {
2021-08-08 18:19:47 +00:00
w.Header().Set("X-Apollo-Error", message)
2021-08-14 17:57:26 +00:00
http.Error(w, message, status)
}