From d34fc9aae842371bd8e30023cbbf7735dd8eef95 Mon Sep 17 00:00:00 2001 From: Adrian Gallagher Date: Thu, 7 Jun 2018 15:23:53 +1000 Subject: [PATCH] Report error to websocket client if they do an unauthorised request --- websocket.go | 1 + 1 file changed, 1 insertion(+) diff --git a/websocket.go b/websocket.go index 59d224eb..3d0901cc 100644 --- a/websocket.go +++ b/websocket.go @@ -176,6 +176,7 @@ func (c *WebsocketClient) read() { if result.authRequired && !c.Authenticated { log.Printf("Websocket: request %s failed due to unauthenticated request on an authenticated API", evt.Event) + c.SendWebsocketMessage(WebsocketEventResponse{Event: evt.Event, Error: "unauthorised request on authenticated API"}) continue }