summaryrefslogtreecommitdiffstats
path: root/wsapi
diff options
context:
space:
mode:
Diffstat (limited to 'wsapi')
-rw-r--r--wsapi/websocket_handler.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/wsapi/websocket_handler.go b/wsapi/websocket_handler.go
index bbad142b3..d137ec7fc 100644
--- a/wsapi/websocket_handler.go
+++ b/wsapi/websocket_handler.go
@@ -9,6 +9,7 @@ import (
"github.com/mattermost/platform/app"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
+ "net/http"
)
func ApiWebSocketHandler(wh func(*model.WebSocketRequest) (map[string]interface{}, *model.AppError)) webSocketHandler {
@@ -54,5 +55,5 @@ func (wh webSocketHandler) ServeWebSocket(conn *app.WebConn, r *model.WebSocketR
}
func NewInvalidWebSocketParamError(action string, name string) *model.AppError {
- return model.NewLocAppError("/api/v3/users/websocket:"+action, "api.websocket_handler.invalid_param.app_error", map[string]interface{}{"Name": name}, "")
+ return model.NewAppError("/api/v3/users/websocket:"+action, "api.websocket_handler.invalid_param.app_error", map[string]interface{}{"Name": name}, "", http.StatusBadRequest)
}