Page MenuHomePhabricator

Add error handling to email commands
Closed, InvalidPublic


We have some custom email commands for which this is particularly important, eg, we have an analogue to landing a diff available to us as an email command. For this email command, and others, the best you can do when an email command fails currently is just "do nothing at all and hope the user eventually figures out that this command did nothing". This is particularly bad if you were counting on the email command to do something for you like land your code.

Ideally email commands would provide error handling mechanisms which respond to the sender in the case of failure.

Event Timeline

I think you should be able to throw any exception to get a reply to the user. Here's what I expect you to get back (from T10709), at least roughly:

Screen Shot 2016-08-22 at 2.02.26 PM.png (303×810 px, 64 KB)

Not working?

No I just read over all of the email commands and didn't see any exceptions thrown and I assumed this didn't work.

It's possible there's some weirdness, but I think it just works. Let me know if that doesn't hold up in practice.