# \[solved\] Slash command failed

**URL:** <https://forum.mattermost.com/t/solved-slash-command-failed/6983>\
**Category:** Troubleshooting\
**Created:** [April 2, 2019, 9:45am UTC](https://forum.mattermost.com/t/solved-slash-command-failed/6983 "2019-04-02T09:45:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gloupmer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/gloupmer/32/2781_2.png) [@gloupmer](https://forum.mattermost.com/u/gloupmer)\
**Post date:** [April 2, 2019, 9:45am UTC](https://forum.mattermost.com/t/solved-slash-command-failed/6983/1 "2019-04-02T09:45:52Z")

</div>

#### Summary

I have an issue with a slash command.When I try my custom command I have this error:

> Command with a trigger of ‘post’ failed

#### Steps to reproduce

My mattermost server is running on windows in a docker and is configured on `http://127.0.0.1:8065`  
I set the site url to: `http://127.0.0.1:8065`  
I added a slash command with this config:  
Request URL : `http://127.0.0.1:5000/post`  
Request Method: POST

I also have a flask server running on `http://127.0.0.1:5000/` which has one route

```
@app.route('/post', methods=['POST', 'GET'])
def post():
    data = request.form
    print(data)

```

I added  
`"EnableInsecureOutgoingConnections": true,`  
`"AllowedUntrustedInternalConnections": "localhost",`  
to config.json, default.json and config-docker.json

#### Expected behavior

When I try /post in the defaukt Town Square channel I get Command with a trigger of ‘post’ failed

```
detailed_error: ""
id: "api.command.execute_command.failed.app_error"
message: "Command with a trigger of 'post' failed"
request_id: "a5n1xkch77g9zb9u6a61456age"
status_code: 500

```

Do you have an idea to solve this ?

---

<div class="post-metadata">

**Author:** ![amy.blais](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/amy.blais/32/7481_2.png) [@amy.blais](https://forum.mattermost.com/u/amy.blais)\
**Post date:** [April 2, 2019, 10:48pm UTC](https://forum.mattermost.com/t/solved-slash-command-failed/6983/2 "2019-04-02T22:48:26Z")

</div>

Hi @gloupmer,

Is that flask app running inside the Mattermost Docker container? (If that’s not the case, then Mattermost’s `127.0.0.1` != flask’s `127.0.0.1` . In other words, Mattermost won’t be able to reach the flask app.)

---

<div class="post-metadata">

**Author:** ![gloupmer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/gloupmer/32/2781_2.png) [@gloupmer](https://forum.mattermost.com/u/gloupmer)\
**Post date:** [April 3, 2019, 8:22am UTC](https://forum.mattermost.com/t/solved-slash-command-failed/6983/3 "2019-04-03T08:22:20Z")

</div>

When I try with the flask server in the container, I can’t access the server on 127.0.0.1:5000  
I added the port 5000 to the container

```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1379bc206848 mattermost/mattermost-preview "/bin/sh -c ./docker…" 17 minutes ago Up About a minute 0.0.0.0:5000->5000/tcp, 0.0.0.0:8065->8065/tcp, 3306/tcp, 33060/tcp, 0.0.0.0:8069->8069/tcp preview
```

---

<div class="post-metadata">

**Author:** ![gloupmer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/gloupmer/32/2781_2.png) [@gloupmer](https://forum.mattermost.com/u/gloupmer)\
**Post date:** [April 3, 2019, 8:32am UTC](https://forum.mattermost.com/t/solved-slash-command-failed/6983/4 "2019-04-03T08:32:20Z")

</div>

I fixed that issue but still have the command failed

---

<div class="post-metadata">

**Author:** ![amy.blais](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/amy.blais/32/7481_2.png) [@amy.blais](https://forum.mattermost.com/u/amy.blais)\
**Post date:** [April 8, 2019, 2:39pm UTC](https://forum.mattermost.com/t/solved-slash-command-failed/6983/5 "2019-04-08T14:39:11Z")

</div>

Hi @gloupmer, Would you be open to joining our [Peer-to-Peer Help channel on our community server](https://community.mattermost.com/) for more help on this issue?

I’m not sure what the solution is and I haven’t received feedback from our team in the past few days on this yet.

---

<div class="post-metadata">

**Author:** ![gloupmer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/gloupmer/32/2781_2.png) [@gloupmer](https://forum.mattermost.com/u/gloupmer)\
**Post date:** [April 10, 2019, 10:14am UTC](https://forum.mattermost.com/t/solved-slash-command-failed/6983/6 "2019-04-10T10:14:02Z")

</div>

I fixed this by changing docker config
