summaryrefslogtreecommitdiffstats
path: root/api/context.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-01-20 14:36:34 -0600
committer=Corey Hulen <corey@hulen.com>2016-01-20 14:36:34 -0600
commit984fa7f1ca1b582f77cc511156e9747b175203e5 (patch)
treef793e0240c4a21b4daeb6cac7dd011c6020d0af2 /api/context.go
parentd703d09063538fb91baa5a21b1001216c43d848a (diff)
downloadchat-984fa7f1ca1b582f77cc511156e9747b175203e5.tar.gz
chat-984fa7f1ca1b582f77cc511156e9747b175203e5.tar.bz2
chat-984fa7f1ca1b582f77cc511156e9747b175203e5.zip
PLT-7-server-db
Diffstat (limited to 'api/context.go')
-rw-r--r--api/context.go3
1 files changed, 2 insertions, 1 deletions
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
}