fix: change DELETE hosting response from 204 to 200#98
Open
Enes830 wants to merge 2 commits intoagentset-ai:mainfrom
Open
fix: change DELETE hosting response from 204 to 200#98Enes830 wants to merge 2 commits intoagentset-ai:mainfrom
Enes830 wants to merge 2 commits intoagentset-ai:mainfrom
Conversation
|
@Enes830 is attempting to deploy a commit to the Agentset Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
makeApiSuccessResponsehelper 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:86where the DELETE namespace endpoint also uses status 204 with a JSON body.Confidence Score: 4/5
apps/web/src/app/api/(public-api)/v1/namespace/[namespaceId]/route.tshas the same bugImportant Files Changed
(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!