def translate_vespa_document_response(cls, status: int, message: Optional[str]=None) -> Tuple[int, Optional[str]]:
        """A helper function to translate Vespa document response into the expected status, message that
        is used in Marqo document API responses.

        Args:
            status: The status code from Vespa document response

        Return:
            A tuple of status code and the message in the response
        """
        vespa_status_code_to_marqo_doc_error_map = {
            200: (200, None),
            404: (404, "Document does not exist in the index"),
            412: (400, "Marqo vector store couldn't update the document. Please see: " + update_documents_response() + " for more details"), # Update documents get 412 from Vespa for document not found as we use condition
            429: (429, "Marqo vector store received too many requests. Please try again later"),
            507: (400, "Marqo vector store is out of memory or disk space"),
        }

        if status in vespa_status_code_to_marqo_doc_error_map:
            return vespa_status_code_to_marqo_doc_error_map[status]
        elif status == 400 and isinstance(message, str) and "could not parse field" in message.lower():
            # TODO Block the invalid special characters before sending to Vespa
            return 400, f"The document contains invalid characters in the fields. Original error: {message} "
        else:
            logger.error(f"An unexpected error occurred from the Vespa document response. "
                         f"status: {status}, message: {message}")
            return 500, f"Marqo vector store returned an unexpected error with this document. Original error: {message}"
A helper function to translate Vespa document response into the expected status, message that
        is used in Marqo document API responses.

        Args:
            status: The status code from Vespa document response

        Return:
            A tuple of status code and the message in the response
        
src/marqo/vespa/vespa_client.py