Skip to content

Commit

Permalink
Serve 404 and return if Slack request cannot be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
iwishiwerearobot committed Jul 24, 2018
1 parent 44d059a commit c07acb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ func (h *SlackHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// If no then match custom paths
if r.URL.Path == h.basePath {
if err := r.ParseForm(); err != nil {
fmt.Errorf("Unable to parse request from Slack: %s", err)
_ = fmt.Errorf("Unable to parse request from Slack: %s", err)
serve(h.DefaultRoute, nil)
return
}

if r.Form.Get("command") != "" {
Expand Down

0 comments on commit c07acb6

Please sign in to comment.