Right now, errors in handlers are unconditionally treated as an internal error:
https://github.com/rust-lang/triagebot/blob/f8f6d205b73fd6ae18c7ecbb3b1879f90b615839/src/handlers.rs#L124
But this is not always the case; for example, telling triagebot to add an invalid label is a user error and should result in leaving a comment. Right now the only way to do so is to handle the error within handle_input and return Ok(). It would be nice to keep the logic in one place by allowing handlers to return HandlerError instead.
Right now, errors in handlers are unconditionally treated as an internal error: https://github.com/rust-lang/triagebot/blob/f8f6d205b73fd6ae18c7ecbb3b1879f90b615839/src/handlers.rs#L124 But this is not always the case; for example, telling triagebot to add an invalid label is a user error and should result in leaving a comment. Right now the only way to do so is to handle the error within
handle_input
and returnOk()
. It would be nice to keep the logic in one place by allowing handlers to returnHandlerError
instead.