document-understanding
latest
false
  • 入门指南
    • 概述
    • 限制和配额
  • Examples Using the Document Understanding™ Cloud API
  • 许可
  • 故障排除
    • Document Understanding Cloud API 错误响应代码
Document Understanding API 指南
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated 2024年9月12日

Document Understanding Cloud API 错误响应代码

根据您的用例,您可以对 Document UnderstandingTM Cloud API 使用两种类型的调用:同步 (sync) 和异步 (async)。

此页面列出了有关 Document UnderstandingTM Cloud API 的常见问题。

处理同步调用出现的错误

如果发生错误,同步调用将返回相应的 HTTP 状态代码,并附加以下信息:
  • 错误代码:标识错误类型的特定代码。
  • 错误消息:描述错误内容的详细解释。

处理异步调用出现的错误

如果出现错误,生成的 URL 将提供以下内容:
  • 错误代码:标识错误类型的特定代码。
  • 错误消息:描述错误内容的详细解释。
如果找到 operationId(由“开始”操作返回),则结果路由将持久返回 202 状态(甚至适用于不成功的请求),并且错误的详细信息将在响应的正文中显示。

有关其他详细信息和示例,请查看 Swagger 文档。

未找到数字化作业或文档 ID

如果未找到数字化作业或文档 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).

解决方案步骤

  1. 调用 /digitization/result/{documentId} 检查数字化的结果。
  2. 重试数字化流程。
  3. 通过重试生成新的文档 ID 后,请使用它来分类和提取数据。

由于客户端错误,数字化失败

在某些情况下,由于客户端错误而导致的数字化失败可能会导致显示错误消息。这是一个 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™ 支持团队。

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。