doc fail behaviour customisation