> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取媒体数据 API 作业错误

> GET /dca/jobs/{job_id}/hp_errors 返回通过 /dca/trigger_hp 启动的 Bright Data 媒体数据 API 作业中每个失败输入的 URL 和错误原因。

获取 Bright Data 媒体数据 API 作业的错误报告。该报告列出每个失败的输入 URL 及其失败原因。

<Note>
  `job_id` 是 [媒体数据 API 触发端点](/cn/api-reference/media-data-api/media-data-api)（`POST /dca/trigger_hp`）返回的带有 `hp_` 前缀的 ID。在 `trigger_hp` 和 `hp_errors` 中，HP 表示高负载（high payload）。Scraper Studio 作业使用另一个端点获取作业错误。
</Note>

## 请求

在路径中传入作业 ID，并在 `Authorization` 请求头中传入您的 API 密钥：

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.brightdata.com/dca/jobs/$JOB_ID/hp_errors" \
    -H "Authorization: Bearer $BRIGHTDATA_API_KEY"
  ```

  ```python Python theme={null}
  import os
  import requests

  job_id = os.environ["JOB_ID"]
  response = requests.get(
      f"https://api.brightdata.com/dca/jobs/{job_id}/hp_errors",
      headers={"Authorization": f"Bearer {os.environ['BRIGHTDATA_API_KEY']}"},
  )
  errors = response.json()
  ```

  ```js Node.js theme={null}
  const jobId = process.env.JOB_ID;
  const response = await fetch(
    `https://api.brightdata.com/dca/jobs/${jobId}/hp_errors`,
    { headers: { Authorization: `Bearer ${process.env.BRIGHTDATA_API_KEY}` } }
  );
  const errors = await response.json();
  ```
</CodeGroup>

响应为 `errors` 数组。每一项包含失败的 `url`、`error` 原因以及内部 `consumer` 标识。

### 查询参数

| 名称 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `skip_normalize` | boolean | 否 | 为 `true` 时返回完整的未规范化错误详情。默认返回规范化后的错误。 |

## 错误

| 状态 | 原因 | 解决方法 |
| - | - | - |
| `400 Bad Request` | 作业 ID 格式无效 | 确认作业 ID 为 `POST /dca/trigger_hp` 返回的带有 `hp_` 前缀的 ID |
| `404 Not Found` | 作业不存在，或您的账户无权访问该作业 | 确认作业 ID 为最新，且来自您触发的作业 |
| `500` | 服务器内部错误 | 使用指数退避重试，例如 1 秒、2 秒、4 秒 |

## 何时使用该端点

* 仅重新提交上一个媒体数据 API 作业中失败的 URL
* 在界面或管理控制台中展示每个 URL 的失败原因

## 相关内容

* [媒体数据 API](/cn/api-reference/media-data-api/media-data-api)：创建作业并返回 `job_id` 的触发端点


## OpenAPI

````yaml api-reference/media-data-api/media-data-api GET /dca/jobs/{job_id}/hp_errors
openapi: 3.1.0
info:
  title: Media Data API
  version: 1.0.0
  description: >-
    Extract video, audio, captions, thumbnails and storyboards from YouTube,
    Vimeo, TikTok and Bilibili and deliver them to your configured storage
    destination.
servers:
  - url: https://api.brightdata.com
security:
  - bearerAuth: []
paths:
  /dca/jobs/{job_id}/hp_errors:
    get:
      summary: Get errors for a Media Data API job
      description: >-
        Retrieves the errors generated during a Media Data API job. The job ID
        must be obtained from the `/dca/trigger_hp` endpoint (HP stands for high
        payload). If the `skip_normalize` query parameter is provided, full
        (non-normalized) error details are returned.
      operationId: getMediaDataJobErrors
      parameters:
        - name: job_id
          in: path
          required: true
          description: Job ID returned from the `/dca/trigger_hp` endpoint
          schema:
            type: string
            example: hp_mn1l61rn1p94ynijur
        - name: skip_normalize
          in: query
          required: false
          description: Return full (non-normalized) error details
          schema:
            type: boolean
      responses:
        '200':
          description: List of errors for the specified job
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: URL that failed during processing
                        error:
                          type: string
                          description: Error type or reason
                        consumer:
                          type: string
                          description: Internal consumer identifier
              example:
                errors:
                  - url: www.youtube.com/watch?v=GBaFv4O5H7g
                    error: aborted
                    consumer: dca-hp-so-szakh
                  - url: www.youtube.com/watch?v=dVSRDWxlWBg
                    error: aborted
                    consumer: dca-hp-so-sz5zu
                  - url: www.youtube.com/watch?v=1YrOL8ZqR4Q
                    error: aborted
                    consumer: dca-hp-so-sz6ga
        '400':
          description: Invalid job ID supplied
          content:
            text/plain:
              schema:
                type: string
                example: Invalid job ID supplied
        '404':
          description: Job not found
          content:
            text/plain:
              schema:
                type: string
                example: Job not found
        '500':
          description: Internal server error
          content:
            text/plain:
              schema:
                type: string
                example: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Bright Data API key. Find it in the [Bright Data Control
        Panel](https://brightdata.com/cp/api_keys).

````