From 984fa7f1ca1b582f77cc511156e9747b175203e5 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 20 Jan 2016 14:36:34 -0600 Subject: PLT-7-server-db --- api/context.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'api/context.go') diff --git a/api/context.go b/api/context.go index b6ffb1a29..a3311a971 100644 --- a/api/context.go +++ b/api/context.go @@ -206,6 +206,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } if c.Err != nil { + c.Err.Translate(c.T) c.Err.RequestId = c.RequestId c.LogError(c.Err) c.Err.Where = r.URL.Path @@ -373,7 +374,7 @@ func (c *Context) RemoveSessionCookie(w http.ResponseWriter, r *http.Request) { } func (c *Context) SetInvalidParam(where string, name string) { - c.Err = model.NewAppError(where, "Invalid "+name+" parameter", "") + c.Err = model.NewLocAppError(where, "api.context.invalid_param", map[string]interface{}{"Name": name}, "") c.Err.StatusCode = http.StatusBadRequest } -- cgit v1.2.3-1-g7c22