apollo-backend/internal/api/errors.go
2021-08-14 13:57:26 -04:00

8 lines
207 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)
http.Error(w, message, status)
}