An Azure service to easily conduct machine translation with a simple REST API call.
The error payload shows an intermittent service-side parsing failure:
-
code:InternalServerError -
innerError.code:InternalServerErrorDocumentParsing -
target:Operation - Message: "Document failed during parsing. If the error persists, report it with date/time of error, request identifier from response header X-RequestId, and client identifier from request header X-ClientTraceId."
This corresponds to the generic high-level error model used by Document Translation and related services, where:
-
codeis one of the standard high-level error codes such asInternalServerError,InvalidArgument,InvalidRequest,RequestRateTooHigh,ResourceNotFound,ServiceUnavailable, orUnauthorized. -
innerErrorprovides a more specific error code and message for the failure.
Because the same file sometimes succeeds and sometimes fails, this aligns with a transient internal service issue rather than a permanent problem with the document or request parameters.
Recommended actions based on the error contract:
- Implement retry logic
- Treat
InternalServerErrorandInternalServerErrorDocumentParsingas transient. - Retry the translation after a short delay when this error occurs.
- Treat
- Capture diagnostics for escalation
- For each failed request, log:
- Date/time of the error (UTC).
-
X-RequestIdfrom the response headers. -
X-ClientTraceIdfrom the request headers (set and log this in the client).
- These values are explicitly requested in the error message and are required for deeper investigation by Azure support.
- For each failed request, log:
- Check status and error details via status APIs
- When polling job or document status, inspect the
statusand error fields returned by:- Get status for a specific translation job or all jobs (
status,summary, and error fields). - Get status for a specific document or all documents (
status,characterCharged, and error fields).
- Get status for a specific translation job or all jobs (
- Confirm that the failure is reported as
FailedwithInternalServerErrorin these status responses, which indicates a service-side issue rather than validation (ValidationFailed) or client errors (InvalidRequest,InvalidArgument,Unauthorized, etc.).
- When polling job or document status, inspect the
- If the error persists for the same file
- After adding retries, if the same document still fails repeatedly with
InternalServerErrorDocumentParsingwhile others succeed, collect:- The failing document (or a redacted/repro version if needed).
- The timestamps,
X-RequestId, andX-ClientTraceIdfor several failed attempts.
- Use these details when opening a support case so the service team can trace the internal failure.
- After adding retries, if the same document still fails repeatedly with
The behavior described (intermittent InternalServerErrorDocumentParsing for the same file) is consistent with the documented error model for Document Translation and should be handled with retries and, if persistent, escalated using the identifiers specified in the error message.
References: