# Responses, Bug: error event shape is wrong between documentation and SDKs and reality

**URL:** <https://community.openai.com/t/responses-bug-error-event-shape-is-wrong-between-documentation-and-sdks-and-reality/1358301>\
**Category:** API\
**Tags:** bug, openai-documentation, sdk, responses-api\
**Created:** [September 16, 2025, 8:11am UTC](https://community.openai.com/t/responses-bug-error-event-shape-is-wrong-between-documentation-and-sdks-and-reality/1358301 "2025-09-16T08:11:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/766292_2.png) [@\_j](https://community.openai.com/u/_j)\
**Post date:** [September 16, 2025, 8:11am UTC](https://community.openai.com/t/responses-bug-error-event-shape-is-wrong-between-documentation-and-sdks-and-reality/1358301/1 "2025-09-16T08:11:31Z")

</div>

# What [it says](https://platform.openai.com/docs/api-reference/responses-streaming/error)

 ![image](https://us1.discourse-cdn.com/openai1/original/4X/6/8/5/685ee11967dbfc26e924f3a982bf454447332a11.png)

# What it depicts

```auto

{
  "type": "error",
  "code": "ERR_SOMETHING",
  "message": "Something went wrong",
  "param": null,
  "sequence_number": 1
}

```

# What is actually received

`event: error`  
`data: {"type":"error","sequence_number":2,"error":{"type":"invalid_request_error","code":null,"message":"There was an issue with your request. Please check your inputs and try again","param":null}}`

Or pretty:

```auto
{
  "type": "error",
  "sequence_number": 2,
  "error": {
    "type": "invalid_request_error",
    "code": null,
    "message": "There was an issue with your request. Please check your inputs and try again",
    "param": null
  }
}

```

# The issue

typeError - you guys are sending an `object` as “error”, not a `string`, and its format doesn’t match the docs either.

The SDK is also going to crash and burn.

> <https://github.com/openai/openai-python/blob/main/src/openai/types/responses/response_error_event.py>

Thanks, OpenAI lurkers!

 ![image](https://us1.discourse-cdn.com/openai1/original/4X/a/8/7/a8736cd4c61379af018f97e72c31521b35c8d2a6.jpeg)

---

<div class="post-metadata">

**Author:** ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/766292_2.png) [@\_j](https://community.openai.com/u/_j)\
**Post date:** [September 17, 2025, 4:29am UTC](https://community.openai.com/t/responses-bug-error-event-shape-is-wrong-between-documentation-and-sdks-and-reality/1358301/2 "2025-09-17T04:29:47Z")

</div>

The blob storage yaml spec updated in the SDK yesterday: Still says “message” == string, and has `"code"` `"message"`, `"parameter"` as required which is not being delivered at the root.

> <https://github.com/openai/openai-python/blob/main/.stats.yml>

```auto
    ResponseErrorEvent:
      type: object
      description: Emitted when an error occurs.
      properties:
        type:
          type: string
          description: |
            The type of the event. Always `error`.
          enum:
            - error
          x-stainless-const: true
        code:
          anyOf:
            - type: string
              description: |
                The error code.
            - type: 'null'
        message:
          type: string
          description: |
            The error message.
        param:
          anyOf:
            - type: string
              description: |
                The error parameter.
            - type: 'null'
        sequence_number:
          type: integer
          description: The sequence number of this event.
      required:
        - type
        - code
        - message
        - param
        - sequence_number
      x-oaiMeta:
        name: error
        group: responses
        example: |
          {
            "type": "error",
            "code": "ERR_SOMETHING",
            "message": "Something went wrong",
            "param": null,
            "sequence_number": 1
          }

```
