Anish Shah added the comment:

>   * multiple fixes both in title like you have in pullrequestevent3.txt
but also in title

Sorry. I didn't get you. You mean, same tests for PR body, right?

> Is vulnerable to other exceptions, I'm a lazy person and I test your code
with following
> command:
> curl -X POST -H "content-type: application/json" -H "X-GitHub-Event:
pull_request" -d @test/data/pullrequestevent3.txt
http://localhost:9999/python-dev/pull_request
> doing so I frequently forgot you have additional data in the testfiles
and I'm getting
> "ValueError: No JSON object could be decoded" at this point. Verify other
exceptions
> and throw generic 'Invalid request' in those places (and don't forget to
add tests)

I was thinking of adding "Exception, e" instead of checking for just
KeyError in dispatch method. But that will also catch Unauthorized,
MethodNotAllowed and unsupportedmediatype. Can you suggest a better way to
do this?

_______________________________________________________
PSF Meta Tracker <metatrac...@psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue589>
_______________________________________________________
_______________________________________________
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to