sympy-bot icon indicating copy to clipboard operation
sympy-bot copied to clipboard

BadRequest error

Open asmeurer opened this issue 6 years ago • 4 comments

The following error happened with PR https://github.com/sympy/sympy/pull/15814.

2019-01-20T17:09:31.684311+00:00 app[web.1]: PR #15814 was opened.
2019-01-20T17:09:31.738566+00:00 app[web.1]: Error handling request
2019-01-20T17:09:31.738574+00:00 app[web.1]: Traceback (most recent call last):
2019-01-20T17:09:31.738595+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 390, in start
2019-01-20T17:09:31.738630+00:00 app[web.1]: resp = await self._request_handler(request)
2019-01-20T17:09:31.738632+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/aiohttp/web_app.py", line 366, in _handle
2019-01-20T17:09:31.738634+00:00 app[web.1]: resp = await handler(request)
2019-01-20T17:09:31.738637+00:00 app[web.1]: File "/app/sympy_bot/webapp.py", line 38, in main_post
2019-01-20T17:09:31.738638+00:00 app[web.1]: result = await router.dispatch(event, gh)
2019-01-20T17:09:31.738640+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gidgethub/routing.py", line 80, in dispatch
2019-01-20T17:09:31.738642+00:00 app[web.1]: await callback(event, *args, **kwargs)
2019-01-20T17:09:31.738645+00:00 app[web.1]: File "/app/sympy_bot/webapp.py", line 66, in pull_request_edited
2019-01-20T17:09:31.738646+00:00 app[web.1]: await pull_request_comment(event, gh)
2019-01-20T17:09:31.738648+00:00 app[web.1]: File "/app/sympy_bot/webapp.py", line 77, in pull_request_comment
2019-01-20T17:09:31.738650+00:00 app[web.1]: async for commit in commits:
2019-01-20T17:09:31.738652+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gidgethub/abc.py", line 109, in getiter
2019-01-20T17:09:31.738661+00:00 app[web.1]: jwt=jwt, oauth_token=oauth_token)
2019-01-20T17:09:31.738663+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gidgethub/abc.py", line 82, in _make_request
2019-01-20T17:09:31.738665+00:00 app[web.1]: data, self.rate_limit, more = sansio.decipher_response(*response)
2019-01-20T17:09:31.738666+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gidgethub/sansio.py", line 326, in decipher_response
2019-01-20T17:09:31.738668+00:00 app[web.1]: raise exc_type(*args)
2019-01-20T17:09:31.741523+00:00 app[web.1]: gidgethub.BadRequest: Not Found

asmeurer avatar Jan 21 '19 23:01 asmeurer

It worked after editing the description.

asmeurer avatar Jan 21 '19 23:01 asmeurer

I think this was just some intermittent issue with the GitHub API. It would be nice to have some sort of error monitoring so that I could be notified of these errors. I only noticed this because I noticed that PR didn't have a bot comment. I'm not sure if we need something as heavy duty as one of the monitoring apps provided by Heroku.

Perhaps a simple start would be to make it post an error comment if the bot check fails (right now it only posts error comments if updating the wiki fails).

asmeurer avatar Jan 21 '19 23:01 asmeurer

Happened again.

2019-01-24T11:51:04.057184+00:00 app[web.1]: PR #15835 was opened.
2019-01-24T11:51:04.118343+00:00 app[web.1]: Error handling request
2019-01-24T11:51:04.118351+00:00 app[web.1]: Traceback (most recent call last):
2019-01-24T11:51:04.118360+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 390, in start
2019-01-24T11:51:04.118362+00:00 app[web.1]: resp = await self._request_handler(request)
2019-01-24T11:51:04.118363+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/aiohttp/web_app.py", line 366, in _handle
2019-01-24T11:51:04.118365+00:00 app[web.1]: resp = await handler(request)
2019-01-24T11:51:04.118368+00:00 app[web.1]: File "/app/sympy_bot/webapp.py", line 38, in main_post
2019-01-24T11:51:04.118369+00:00 app[web.1]: result = await router.dispatch(event, gh)
2019-01-24T11:51:04.118371+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gidgethub/routing.py", line 80, in dispatch
2019-01-24T11:51:04.118372+00:00 app[web.1]: await callback(event, *args, **kwargs)
2019-01-24T11:51:04.118375+00:00 app[web.1]: File "/app/sympy_bot/webapp.py", line 66, in pull_request_edited
2019-01-24T11:51:04.118376+00:00 app[web.1]: await pull_request_comment(event, gh)
2019-01-24T11:51:04.118378+00:00 app[web.1]: File "/app/sympy_bot/webapp.py", line 77, in pull_request_comment
2019-01-24T11:51:04.118379+00:00 app[web.1]: async for commit in commits:
2019-01-24T11:51:04.118382+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gidgethub/abc.py", line 109, in getiter
2019-01-24T11:51:04.118384+00:00 app[web.1]: jwt=jwt, oauth_token=oauth_token)
2019-01-24T11:51:04.118385+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gidgethub/abc.py", line 82, in _make_request
2019-01-24T11:51:04.118387+00:00 app[web.1]: data, self.rate_limit, more = sansio.decipher_response(*response)
2019-01-24T11:51:04.118388+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gidgethub/sansio.py", line 326, in decipher_response
2019-01-24T11:51:04.118390+00:00 app[web.1]: raise exc_type(*args)
2019-01-24T11:51:04.118399+00:00 app[web.1]: gidgethub.BadRequest: Not Found

asmeurer avatar Jan 24 '19 22:01 asmeurer

I was able to confirm that it works when redelivering the payload from the GitHub webhooks page. Still not clear if this is a bug in gidgethub or GitHub's webhook delivery.

asmeurer avatar Feb 25 '19 19:02 asmeurer