apollo-backend/internal/api/errors.go

9 lines
210 B
Go
Raw Normal View History

package api
import "net/http"
2022-05-21 14:00:21 +00:00
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)
}