Gabisonfire / discord-keel-bridge

0 stars 0 forks source link

ERROR in app: Exception on /v1/incoming [POST] #1

Open m4dm4rtig4n opened 3 years ago

m4dm4rtig4n commented 3 years ago

Hello,

I try to integrate you discord webhook, but i have an error :

Bridge listening on port: 5000
[2021-06-08 22:50:22,122] ERROR in app: Exception on /v1/incoming [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "discord_keel_bridge.py", line 17, in incoming
    discord["content"] = f'**{original["name"]}:** {original["message"]}. ({original["createdAt"]}).'
TypeError: 'NoneType' object is not subscriptable
10.42.0.185 - - [2021-06-08 22:50:22] "POST /v1/incoming HTTP/1.1" 500 426 0.001597                                                                                                                                                     ││ discord-keel-bridge-947578665-bfzzh:10.42.0.185 - - [2021-06-08 22:50:22] "POST /v1/incoming HTTP/1.1" 500 426 0.001597

have you idea ?

Gabisonfire commented 3 years ago

What version of keel are you using? And also what did you put in your helm values for:

webhook:
  enabled: true
  endpoint:
cvalentin-dkt commented 3 years ago

I'm on latest version of Keel. arch=amd64 build_date=2021-04-26T100646Z go_version=go1.14.2 os=linux revision=421495f5

And I have enable webhook :/

I have recreate discord notification with Node-RED Flow.

Gabisonfire commented 3 years ago

Im' not sure what you mean by that: "I have recreate discord notification with Node-RED Flow." But I wanted to see what the URL looked like. It seems like the request it's receiving is not in a proper format.

cvalentin-dkt commented 3 years ago

I have set this url : http://discord-keel-bridge.keel.svc.cluster.local:5000/v1/incoming

Im' not sure what you mean by that: "I have recreate discord notification with Node-RED Flow." => I replaced "discord-keel-bridge" by a flow on Node-RED