Skip to content

fix: change DELETE hosting response from 204 to 200#98

Open
Enes830 wants to merge 2 commits intoagentset-ai:mainfrom
Enes830:fix/hosting-delete-response-status
Open

fix: change DELETE hosting response from 204 to 200#98
Enes830 wants to merge 2 commits intoagentset-ai:mainfrom
Enes830:fix/hosting-delete-response-status

Conversation

@Enes830
Copy link
Copy Markdown

@Enes830 Enes830 commented Jan 31, 2026

Fixes 500 error when deleting hosting via the public API.

Greptile Overview

Greptile Summary

This PR fixes a 500 error in the DELETE hosting endpoint by changing the HTTP status code from 204 (No Content) to 200 (OK). The issue occurred because HTTP 204 responses must not include a response body, but the makeApiSuccessResponse helper returns a JSON body. Using status 200 allows the JSON response to be sent correctly.

The fix is correct and aligns with the other DELETE endpoints in the codebase (/documents/[documentId] and /ingest-jobs/[jobId]), which also return 200 status codes with response bodies.

However, the same bug exists in apps/web/src/app/api/(public-api)/v1/namespace/[namespaceId]/route.ts:86 where the DELETE namespace endpoint also uses status 204 with a JSON body.

Confidence Score: 4/5

  • This PR is safe to merge - it fixes a real bug causing 500 errors
  • The fix correctly addresses the HTTP 204 incompatibility with JSON response bodies. Score is 4 instead of 5 because the same bug exists in the namespace DELETE endpoint
  • No files in this PR require special attention, but note that apps/web/src/app/api/(public-api)/v1/namespace/[namespaceId]/route.ts has the same bug

Important Files Changed

Filename Overview
apps/web/src/app/api/(public-api)/v1/namespace/[namespaceId]/hosting/route.ts Changed DELETE response status from 204 to 200, fixing 500 error when returning JSON body

(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 31, 2026

@Enes830 is attempting to deploy a commit to the Agentset Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant