requestConfluence DELETE space prop by ID now returns TypeError: Failed to construct 'Response': Response with null body status cannot have body

Hello,
in our delete space property function using forge/bridge requestConfluence worked fine in production. With the new deploy now suddenly there is this error with no changes made around this function.
Could the error be on the side of the forge/bridge requestConfluence DELETE method?
Thank you for any tips.

const deleteSpaceProp = async (space, propertyId) => {
   setIsToggleLoading(true);
    const res = await requestConfluence(
      `/wiki/api/v2/spaces/${space.id}/properties/${propertyId}`,
      {
        method: "DELETE",
      }
    
    );
   setIsToggleLoading(false);
}
Uncaught (in promise) TypeError: Failed to construct 'Response': Response with null body status cannot have body
    at X (https://confluence-v1-canary.prod.atl-paas.net/master/41157.3yDfj6EKpQ.js:80:1032)
    at async Object.fetchProduct (https://confluence-v1-canary.prod.atl-paas.net/master/41157.3yDfj6EKpQ.js:80:8088)
    at async https://confluence-v1-canary.prod.atl-paas.net/master/41157.3yDfj6EKpQ.js:74:3676

Error: Failed to construct 'Response': Response with null body status cannot have body
    at fe.error (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:2:122172)
    at Object.<anonymous> (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:2:129945)
    at JSON.parse (<anonymous>)
    at o (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:2:129804)
    at ke (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:2:129957)
    at s.on (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:2:134617)
    at je (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:2:134754)
    at https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:2:140740
    at e.try (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:2:113224)
    at https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:2:140537
2 Likes

I’m facing the same error when I call the delete page API.
I believe this is a bug of Forge.

1 Like

Hello, I am not sure if it has been resolved yet but you might try using the requestConfluence method from the @forge/api package → respective that the request call would go “through backend” (invoke some function and call it from there), rather than making the call directly from the frontend using the requestConfluence method from @forge/bridge. This approach worked for us.