pkg/api: Check errors (#19657)

* pkg/api: Check errors
* pkg/api: Remove unused function HashEmail
This commit is contained in:
Arve Knudsen
2019-10-08 18:57:53 +02:00
committed by GitHub
parent dabc848e11
commit 0a2d5e16dd
12 changed files with 86 additions and 45 deletions
+3 -1
View File
@@ -55,7 +55,9 @@ func (r *NormalResponse) WriteTo(ctx *m.ReqContext) {
header[k] = v
}
ctx.Resp.WriteHeader(r.status)
ctx.Resp.Write(r.body)
if _, err := ctx.Resp.Write(r.body); err != nil {
ctx.Logger.Error("Error writing to response", "err", err)
}
}
func (r *NormalResponse) Cache(ttl string) *NormalResponse {