summaryrefslogtreecommitdiffstats
path: root/api/context.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-01-20 15:14:31 -0600
committerCorey Hulen <corey@hulen.com>2016-01-20 15:14:31 -0600
commit9f526555df64885be27e38e588c23332d80cd208 (patch)
tree80f5bcefbf4a481d6c841ff9ae333500ed143d88 /api/context.go
parentd703d09063538fb91baa5a21b1001216c43d848a (diff)
parentd74e2f3e1146efd80d4eeee36cf5c53e68b31fcc (diff)
downloadchat-9f526555df64885be27e38e588c23332d80cd208.tar.gz
chat-9f526555df64885be27e38e588c23332d80cd208.tar.bz2
chat-9f526555df64885be27e38e588c23332d80cd208.zip
Merge pull request #1934 from mattermost/PLT-7-server-db
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
}