Skip to content

Add uuid to 409 Conflict response body when creating a webhook via /v2/webhooks #25573

@oauth-enjoyer

Description

@oauth-enjoyer

Is your proposal related to a problem?

When creating a webhook using POST /v2/webhooks, if the subscriberUrl is already registered for the store, the API returns a 409 Conflict response.
The problem is that the response body does not include the UUID of the existing webhook

Because of this, if the application needs to update, deactivate, or delete the existing webhook, it must:

  1. Call GET /v2/webhooks
  2. Retrieve all webhooks
  3. Filter them manually by subscriberUrl

This creates unnecessary extra requests and increases complexity

Describe the solution you'd like

Include the existing webhook’s UUID directly in the 409 Conflict response when the subscriberUrl already exists

"error": {
    "code": "ConflictException",
    "message": "Webhook with this subscriber url already exists for this user",
    "details": {
      "uuid": " ... ",
      "message": "Webhook with this subscriber url already exists for this user",
      "error": "Conflict",
      "statusCode": 409
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    🧹 ImprovementsImprovements to existing features. Mostly UX/UI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions