document-understanding
latest
false
Document Understanding Cloud API 错误响应代码
Document Understanding API 指南
Last updated 2024年11月21日
Document Understanding Cloud API 错误响应代码
Depending on your use case, you can use two types of calls for Document UnderstandingTM Cloud APIs: synchronous (sync) and asynchronous (async).
Common issues concerning Document UnderstandingTM Cloud APIs are outlined in this page.
如果未找到数字化作业或文档 ID,则会生成错误消息:
- 如果您使用分类或提取同步 API,则会显示
404, Code:[DocumentIdNotFound]
错误。 - 如果您使用异步 API 进行分类或提取,则获取结果将返回
200, Code:[DocumentIdNotFound]
错误。
在这两种情况下,都会生成以下错误消息:
Cannot perform the operation for the given documentId: Ensure it is correct, the
digitization is successful (retrieving the digitization result), and not more than 7 days
since the digitization call passed (case in which, it expired).
在某些情况下,由于客户端错误而导致的数字化失败可能会导致显示错误消息。这是一个
400
错误,具体显示如下:Code: [DigitizationErrorCode], Message: "DigitizationErrorMessage"
。错误代码和相应的消息可具有以下值之一:
[UnsupportedContentTypeError]", "Content type of the input document is not supported."
[UnexpectedPdfStructureError]", "Invalid or corrupt PDF structure."
[InvalidImageSizeError]", "Image size of the input document is not supported."
[UnableToProcessContentError]", "Unable to process document contents."
[ContentTypeMismatchError]", "Declared content-type of the input document does not match the binary content type."
[PasswordProtectedPdfError]", "Password protected PDFs are not supported."
[MaximumNumberOfPagesPerDocumentLimitExceededError]", "Maximum number of pages for digitization exceeded."
[InvalidRequestData]", "The form data in the request is invalid. Expected is a multi-part form data, with either one part consisting of the document to be digitized, or two named parts: File - the document, DigitizationResult - the digitization result, with content type application/json."
[UnexpectedDigitizationResultStructure]", "The digitization result object is invalid and non-serializable."
[InvalidDom]", "The provided DOM is invalid. Make sure the DOM is correctly built, including valid non-overlapping indices, well formed boxes and polygons and valid values for all properties."
[MismatchingDomAndContent]", "The provided DOM and content do not match. Make sure the DOM was generated on the provided document."
[MismatchingDomAndText]", "The provided DOM and text do not match. Make sure the text and DOM were generated on the same document."
[PreprocessingOptionIncompatibleWithDigitizationResult]", "Using the preprocessing option while also providing a digitization result input is not supported."
[InvalidOcrApiKeyError]", "OCR Api key is invalid."
[OcrTooManyRequestsError]", "OCR request quota exceeded."
[ExternalOcrTooManyRequestsError]", "OCR request quota exceeded."
[GoogleBillingNotEnabled]", "Google OCR billing is not enabled. Please enable billing in your Google Cloud Platform account."
[GoogleApiKeyExpired]", "Google OCR Api Key Expired."
[InvalidOcrUrlError]", "The provided OCR URL is invalid or malformed."
[InvalidResponseFromOcrEngineError]", "Invalid response received from the OCR engine. Please set another OCR engine for the project you are using."
[UnsupportedContentTypeError]", "Content type of the input document is not supported."
[UnexpectedPdfStructureError]", "Invalid or corrupt PDF structure."
[InvalidImageSizeError]", "Image size of the input document is not supported."
[UnableToProcessContentError]", "Unable to process document contents."
[ContentTypeMismatchError]", "Declared content-type of the input document does not match the binary content type."
[PasswordProtectedPdfError]", "Password protected PDFs are not supported."
[MaximumNumberOfPagesPerDocumentLimitExceededError]", "Maximum number of pages for digitization exceeded."
[InvalidRequestData]", "The form data in the request is invalid. Expected is a multi-part form data, with either one part consisting of the document to be digitized, or two named parts: File - the document, DigitizationResult - the digitization result, with content type application/json."
[UnexpectedDigitizationResultStructure]", "The digitization result object is invalid and non-serializable."
[InvalidDom]", "The provided DOM is invalid. Make sure the DOM is correctly built, including valid non-overlapping indices, well formed boxes and polygons and valid values for all properties."
[MismatchingDomAndContent]", "The provided DOM and content do not match. Make sure the DOM was generated on the provided document."
[MismatchingDomAndText]", "The provided DOM and text do not match. Make sure the text and DOM were generated on the same document."
[PreprocessingOptionIncompatibleWithDigitizationResult]", "Using the preprocessing option while also providing a digitization result input is not supported."
[InvalidOcrApiKeyError]", "OCR Api key is invalid."
[OcrTooManyRequestsError]", "OCR request quota exceeded."
[ExternalOcrTooManyRequestsError]", "OCR request quota exceeded."
[GoogleBillingNotEnabled]", "Google OCR billing is not enabled. Please enable billing in your Google Cloud Platform account."
[GoogleApiKeyExpired]", "Google OCR Api Key Expired."
[InvalidOcrUrlError]", "The provided OCR URL is invalid or malformed."
[InvalidResponseFromOcrEngineError]", "Invalid response received from the OCR engine. Please set another OCR engine for the project you are using."
如果数字化由于服务器错误而失败,此操作可能会生成错误消息。这是一个
500
错误,具体显示如下:Code: [DigitizationFailedServerError], Message: Internal Server Error
。
如果您遇到此错误,建议您联系UiPath™支持团队。
如果由于文档超过五页而导致同步调用失败,则会生成错误消息。这是一个
400
错误,具体显示如下:Code: [SyncMaximumNumberOfPagesExceeded], Message: Maximum Number Of Pages Exceeded
。
If you encounter this error, use asysnchronous APIs. Asynchronous APIs are always recommended for production use cases. Synchronous APIs are only recommended in the following situations:
- When you are certain that you will never have more than five pages.
- If you only have single-page images, no PDFs or TIFFs.
- When preparing proof of concepts or demos.