Skip to content

Adds missing return keyword before NextResponse.json()#229

Merged
SATYAM-PRATIBHAN merged 1 commit into
SATYAM-PRATIBHAN:mainfrom
soumojit-D48:fix/missing-return-get-generate-id
May 26, 2026
Merged

Adds missing return keyword before NextResponse.json()#229
SATYAM-PRATIBHAN merged 1 commit into
SATYAM-PRATIBHAN:mainfrom
soumojit-D48:fix/missing-return-get-generate-id

Conversation

@soumojit-D48
Copy link
Copy Markdown
Contributor

Description

Adds missing return keyword before NextResponse.json() in the GET handler of /api/generate/[id]. Without it, when the authenticated user's database record is not found, execution falls through to the catch block and returns a 500 Internal Server Error instead of the intended 404 Not Found.
Type of Change

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • My changes generate no new warnings
  • I have tested my changes locally

### Requested Labels

GSSoC 2026 , gssoc:approved , level:beginner , quality:clean , type:refactor

@netlify
Copy link
Copy Markdown

netlify Bot commented May 26, 2026

👷 Deploy request for arcmind-ai pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 01a21e5

@soumojit-D48
Copy link
Copy Markdown
Contributor Author

@SATYAM-PRATIBHAN, Hi Kindly this PR and let me know , Thank You!!

@SATYAM-PRATIBHAN SATYAM-PRATIBHAN added gssoc:approved This issue or pull request already exists type:refactor level:beginner Advance UI labels May 26, 2026
@SATYAM-PRATIBHAN SATYAM-PRATIBHAN merged commit fd9d110 into SATYAM-PRATIBHAN:main May 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved This issue or pull request already exists level:beginner Advance UI type:refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unreachable 404 check in DELETE /api/generate/id due to Prisma throwing on missing record

2 participants