apollo-backend/internal/api/errors.go
Andre Medeiros 993c07938c ALL THE API
2021-08-08 14:19:47 -04:00

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))
}