bradshjg / flask-githubapp

Flask extension for rapid Github app development in Python, in the spirit of probot (https://probot.github.io/)
MIT License
56 stars 14 forks source link

Exception on / [POST] #24

Closed sparky005 closed 3 years ago

sparky005 commented 3 years ago

I'm getting some some errors and I'm not really sure where they're coming from or how to debug. Is this a lib issue or an issue with my setup?

Traceback (most recent call last):
  File "/app/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/app/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/app/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/app/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/app/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/app/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/app/site-packages/flask_githubapp/core.py", line 169, in _flask_view_func
    event = request.headers['X-GitHub-Event']
  File "/app/site-packages/werkzeug/datastructures.py", line 1463, in __getitem__
    return _unicodify_header_value(self.environ["HTTP_" + key])
KeyError: 'HTTP_X_GITHUB_EVENT'
Napo2k commented 3 years ago

Hello!

Can you provide more details on how exactly are you getting this? Are you testing with a curl? That message more or less means that there is no X-Github-Event header in the request, which makes me think you are testing locally for now.