From 9f65284ba1c67c20de1ccd7a5af80aa64c3575f7 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 22 Feb 2017 21:32:39 -0500 Subject: Fix response for malformed command execute request (#5498) --- api/command.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'api/command.go') diff --git a/api/command.go b/api/command.go index 7e0a1e232..c3a64702f 100644 --- a/api/command.go +++ b/api/command.go @@ -219,6 +219,10 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) { } func handleResponse(c *Context, w http.ResponseWriter, response *model.CommandResponse, commandArgs *model.CommandArgs, cmd *model.Command, builtIn bool) { + if c.Err != nil { + return + } + post := &model.Post{} post.ChannelId = commandArgs.ChannelId post.RootId = commandArgs.RootId -- cgit v1.2.3-1-g7c22