pkg/api: Check errors (#19657)

* pkg/api: Check errors
* pkg/api: Remove unused function HashEmail
This commit is contained in:
Arve Knudsen authored and GitHub committed 2019-10-08 18:57:53 +02:00
1 parent dabc848e11
commit 0a2d5e16dd
12 files changed
+86 -45

No files matched your search

+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 {