allow protoError and replyError to be any type of callable