Skip to content

Improper error response when PATCHing followup to interaction #7550

Open
@thewilloftheshadow

Description

@thewilloftheshadow

Description

When I make a request to PATCH /webhooks/<application_id>/<interaction_token>/messages/@original with an invalid body (in this case, an invalid link for a link button), the response given does not match any of the 3 documented error formats listed here: https://discord.com/developers/docs/reference#error-messages

Steps to Reproduce

  1. Obtain a token to respond to a deferred interaction response
  2. Send a PATCH request to edit the initial response, example curl command below:
curl -v -X PATCH 'https://discord.com/api/webhooks/ID/TOKEN/messages/%40original' \
  -H 'Authorization: Bot BOTTOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"content":"Look at this button!","components":[{"type":1,"components":[{"type":2,"url":"not a valid url","style":5,"label":"Documentation"}]}]}'

Expected Behavior

I expected the response to be in one of the 3 documented error message formats, specifically I expected the Array Error

Current Behavior

I receive a 400 Bad Request with the following JSON body:

{"components": ["0"]}

Screenshots/Videos

No response

Client and System Information

@buape/carbon 0.9.0 (beta) - reproduced with solely curl
Bun 1.2.10
MacOS 15.0 (24A335)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions