Skip to content

Commit

Permalink
increased logging on bad input
Browse files Browse the repository at this point in the history
  • Loading branch information
purehyperbole committed Jan 30, 2019
1 parent 7679971 commit d044eed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ func authenticate(w http.ResponseWriter, c *websocket.Conn) (*Session, error) {

mt, message, err := c.ReadMessage()
if err != nil {
log.Println(string(message))
return nil, badrequest(w)
}

err = json.Unmarshal(message, &s)
if err != nil {
log.Println(string(message))
return nil, badrequest(w)
}

Expand Down

0 comments on commit d044eed

Please sign in to comment.