Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Give 404 when requesting nonexistent tasks or workers #2921
Cool. Thanks for doing this @martindurant ! It's also nice to see more people get involved in the Tornado codebase.
One small thought, thoughts on responding with a more informative error message? After googling around for a bit (I didn't know how to do this) it seems like this is possible by setting the status code, then writing a normal response, and then returning (I think?)
No worries if you'd like to just be done though. This is clearly a nice improvement.
Indeed, this error is just the simplest thing, and there are many custom 40* pages, etc.; I would say it's maybe worthwhile in most cases to include an informative message, but here that message would only be "task %s not found" or somesuch, so it doesn't actually add any information.
I'll just merge this as-is, and we can consider more general error-handling on the HTTP routes another time.
Aug 3, 2019
Sounds good. Just to be clear, "Task ... not found" or "Worker ... not found" is way more informative that 404…
On Sat, Aug 3, 2019 at 2:33 PM Martin Durant ***@***.***> wrote: Merged #2921 <#2921> into master. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#2921?email_source=notifications&email_token=AACKZTCJ3ZDKOKW34RYPYNTQCX2Q3A5CNFSM4IJDYDAKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOS3RYCMA#event-2531492144>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AACKZTAENV6SPYMK6Z3U23LQCX2Q3ANCNFSM4IJDYDAA> .