Skip to content

Commit

Permalink
fixed gorilla required header error shadowing (deepmap#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmarinic committed Jul 25, 2022
1 parent e0480c9 commit 3651582
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/codegen/templates/gorilla/gorilla-middleware.tmpl
Expand Up @@ -117,7 +117,7 @@ func (siw *ServerInterfaceWrapper) {{$opid}}(w http.ResponseWriter, r *http.Requ
params.{{.GoName}} = {{if not .Required}}&{{end}}{{.GoName}}

} {{if .Required}}else {
err := fmt.Errorf("Header parameter {{.ParamName}} is required, but not found")
err = fmt.Errorf("Header parameter {{.ParamName}} is required, but not found")
siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "{{.ParamName}}", Err: err})
return
}{{end}}
Expand Down

0 comments on commit 3651582

Please sign in to comment.