Batch failing opaquely - entities has no child field masks, read errors via get_operation
Two batch-processing gotchas in one: first, the entities field does not support child field masks - use the top-level entities selector, not entities.id or entities.mentionText, or the request fails.
Two batch-processing gotchas in one: first, the entities field does not support child field masks - use the top-level entities selector, not entities.id or entities.mentionText, or the request fails. Second, the batch call swallows the real error, so when a batch fails opaquely, poll the operation with get_operation to read the full error message. Fix the mask and read errors from the operation, not the batch response.
Context: Stack Overflow 79640432 (accepted answer): a Document AI batch OCR request kept failing with an unhelpful error. The reporter found two things: the field mask was wrong, and the batch request itself hid the real error.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.