MCPcopy Create free account
hub / github.com/netlify/gotrue / redirectErrors

Method redirectErrors

api/external.go:318–327  ·  view source on GitHub ↗
(handler apiHandler, w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

316}
317
318func (a *API) redirectErrors(handler apiHandler, w http.ResponseWriter, r *http.Request) {
319 ctx := r.Context()
320 log := getLogEntry(r)
321 errorID := getRequestID(ctx)
322 err := handler(w, r)
323 if err != nil {
324 q := getErrorQueryString(err, errorID, log)
325 http.Redirect(w, r, a.getExternalRedirectURL(r)+"#"+q.Encode(), http.StatusFound)
326 }
327}
328
329func getErrorQueryString(err error, errorID string, log logrus.FieldLogger) *url.Values {
330 q := url.Values{}

Callers 1

Calls 5

getLogEntryFunction · 0.85
getRequestIDFunction · 0.85
handlerFunction · 0.85
getErrorQueryStringFunction · 0.85

Tested by

no test coverage detected