Download the error file for an OpenAI batch
Source:R/openai_batch_api.R
openai_download_batch_errors.RdRetrieves batch metadata and downloads the raw JSONL file identified by
error_file_id. This works even when the batch has no output_file_id.
An error is raised if no valid error file ID is available; the message
includes the batch ID and status. HTTP and local file-write errors propagate.
An existing local file is overwritten only after its content is downloaded.
Details
Successful requests are retrieved with openai_download_batch_output().
Reconcile both files against submitted requests by custom_id, not line
order. This helper does not parse errors or retry failed comparisons.
Retrieval retries
Batch metadata and result-file GET requests retry HTTP 408, 429, all 5xx
responses, and transport failures, with at most three total HTTP attempts
per GET. Valid Retry-After seconds or HTTP dates take precedence; otherwise
retries use exponential backoff starting at 0.5 seconds plus up to 0.25
seconds of jitter, capped at 30 seconds. Other HTTP errors fail immediately.
Exhaustion raises the original error with the additional class
pairwiseLLM_batch_retry_exhausted. These retries retrieve the same batch;
they do not resubmit comparisons or create scientific failed-attempt rows.
See also
openai_get_batch(), openai_download_batch_output()
Other batch backends:
anthropic_create_batch(),
anthropic_download_batch_results(),
anthropic_get_batch(),
anthropic_poll_batch_until_complete(),
build_anthropic_batch_requests(),
build_gemini_batch_requests(),
build_openai_batch_requests(),
gemini_create_batch(),
gemini_download_batch_results(),
gemini_get_batch(),
gemini_poll_batch_until_complete(),
llm_download_batch_results(),
llm_resume_multi_batches(),
llm_submit_pairs_batch(),
llm_submit_pairs_multi_batch(),
openai_create_batch(),
openai_download_batch_output(),
openai_get_batch(),
openai_poll_batch_until_complete(),
openai_upload_batch_file(),
run_anthropic_batch_pipeline(),
run_gemini_batch_pipeline(),
run_openai_batch_pipeline(),
write_openai_batch_file()