Skip to content

Commit

Permalink
ErrorReply's return value was never used.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynom committed Dec 30, 2018
1 parent c20f833 commit 45e311f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions error.go
Expand Up @@ -107,14 +107,14 @@ func replyWithPlaceholder(req *http.Request, w http.ResponseWriter, err Error, o
return err
}

func ErrorReply(req *http.Request, w http.ResponseWriter, err Error, o ServerOptions) error {
func ErrorReply(req *http.Request, w http.ResponseWriter, err Error, o ServerOptions) {
// Reply with placeholder if required
if o.EnablePlaceholder || o.Placeholder != "" {
return replyWithPlaceholder(req, w, err, o)
_ = replyWithPlaceholder(req, w, err, o)
return
}

w.Header().Set("Content-Type", "application/json")
w.WriteHeader(err.HTTPCode())
_, _ = w.Write(err.JSON())
return err
}

0 comments on commit 45e311f

Please sign in to comment.