Add Document#failed? to check if a document processing failed