diff options
Diffstat (limited to 'api/web_socket.go')
-rw-r--r-- | api/web_socket.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/api/web_socket.go b/api/web_socket.go index 995e2a677..7590e6646 100644 --- a/api/web_socket.go +++ b/api/web_socket.go @@ -8,11 +8,12 @@ import ( "github.com/gorilla/mux" "github.com/gorilla/websocket" "github.com/mattermost/platform/model" + "github.com/mattermost/platform/utils" "net/http" ) func InitWebSocket(r *mux.Router) { - l4g.Debug("Initializing web socket api routes") + l4g.Debug(utils.T("api.web_socket.init.debug")) r.Handle("/websocket", ApiUserRequired(connect)).Methods("GET") hub.Start() } @@ -28,8 +29,8 @@ func connect(c *Context, w http.ResponseWriter, r *http.Request) { ws, err := upgrader.Upgrade(w, r, nil) if err != nil { - l4g.Error("websocket connect err: %v", err) - c.Err = model.NewAppError("connect", "Failed to upgrade websocket connection", "") + l4g.Error(utils.T("api.web_socket.connect.error"), err) + c.Err = model.NewLocAppError("connect", "api.web_socket.connect.upgrade.app_error", nil, "") return } |