BUG: Ombi webhook not actually enabled on Ombi side due to missing ID in settings payload #41

Closed
opened 2026-05-23 10:10:30 +01:00 by Gandalf · 1 comment
Owner

Bug Description

While the Ombi webhook enable button no longer returns a 404, clicking it does not actually enable the webhook on the Ombi side. The webhook remains disabled.

Root Cause

  1. In server/routes/ombi.js, POST /api/ombi/webhook/enable calls POST {ombi}/api/v1/Settings/notifications/webhook with the payload:
    {
      "enabled": true,
      "webhookUrl": "...",
      "applicationToken": "..."
    }
    
  2. According to Ombi's Swagger documentation, the WebhookNotificationViewModel schema contains an id property.
  3. In Ombi's backend (ASP.NET Core / Entity Framework), setting updates require the existing database record id to be passed. If it is omitted or set to 0, Entity Framework Core fails to perform the update on the single settings row, causing the change to not persist even if the HTTP request returns 200.

Remediation Plan

  1. In server/routes/ombi.js, update POST /api/ombi/webhook/enable to first perform a GET request to GET {ombi}/api/v1/Settings/notifications/webhook to retrieve the current webhook configuration and its database id.
  2. Merge the id from the retrieved configuration into the payload of the subsequent POST request.
### Bug Description While the Ombi webhook enable button no longer returns a 404, clicking it does not actually enable the webhook on the Ombi side. The webhook remains disabled. ### Root Cause 1. In `server/routes/ombi.js`, `POST /api/ombi/webhook/enable` calls `POST {ombi}/api/v1/Settings/notifications/webhook` with the payload: ```json { "enabled": true, "webhookUrl": "...", "applicationToken": "..." } ``` 2. According to Ombi's Swagger documentation, the `WebhookNotificationViewModel` schema contains an `id` property. 3. In Ombi's backend (ASP.NET Core / Entity Framework), setting updates require the existing database record `id` to be passed. If it is omitted or set to `0`, Entity Framework Core fails to perform the update on the single settings row, causing the change to not persist even if the HTTP request returns 200. ### Remediation Plan 1. In `server/routes/ombi.js`, update `POST /api/ombi/webhook/enable` to first perform a `GET` request to `GET {ombi}/api/v1/Settings/notifications/webhook` to retrieve the current webhook configuration and its database `id`. 2. Merge the `id` from the retrieved configuration into the payload of the subsequent `POST` request.
Gandalf added the Kind/Bug
Priority
High
2
labels 2026-05-23 10:10:30 +01:00
Author
Owner

Reopened and successfully closed via commit de71580756dfc5bb88b78c7d0cf05f297a1ce441 on the develop branch.

Added fetching of existing Ombi webhook settings prior to enabling the webhook. The retrieved settings id is now merged back into the POST payload. This guarantees that Entity Framework on the Ombi backend performs an update on the correct database row, enabling the webhook successfully and allowing its state to persist correctly.

Reopened and successfully closed via commit [de71580756dfc5bb88b78c7d0cf05f297a1ce441](https://git.i3omb.com/Gandalf/sofarr/commit/de71580756dfc5bb88b78c7d0cf05f297a1ce441) on the `develop` branch. Added fetching of existing Ombi webhook settings prior to enabling the webhook. The retrieved settings `id` is now merged back into the `POST` payload. This guarantees that Entity Framework on the Ombi backend performs an update on the correct database row, enabling the webhook successfully and allowing its state to persist correctly.
Gandalf added the Area/Proxy label 2026-05-28 11:58:29 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/sofarr#41