Prompt Details
Model
Chat - (gpt-5.5)
Token size
431
Example input
[Target Language/Framework]: TypeScript / Next.js
[e.g., TypeScript / Next.js / Python]: TypeScript / Next.js
[Target IDE/Model]: Cursor AI
[e.g., Cursor / Windsurf / Claude 3.5 Sonnet / ChatGPT]: Cursor AI
Example output
# Summary
Added explicit validation for body.user and body.user.email to prevent a runtime TypeError before calling toLowerCase().
---
# Files Affected
src/pages/api/auth/login.ts
---
# Why These Changes
If body.user is undefined, accessing body.user.email directly throws an unhandled exception. Adding early null checks prevents API crashes.
---
# Diff
```diff
@@ -12,4 +12,7 @@
export async function handler(req: NextApiRequest, res: NextApiResponse) {
+ if (!req.body?.user?.email) {
+ return res.status(400).json({ error: "Missing required user email" });
+ }
const email = req.body.user.email.toLowerCase();
Notes
No breaking changes. Existing API contract remains fully backward-compatible.
Or get it with Select10 Select prompts/mo — under $2 each
Learn moreBy purchasing this prompt, you agree to our terms of service
GPT-5.5
Tired of Cursor or Claude rewriting 500-line files & breaking code to fix a single bug? Standard AI prompts fail without strict boundaries. This production-grade system prompt turns your AI into a disciplined Senior Architect.
⚡ Key Benefits:
• Zero whole-file rewrites (Strict Unified Diff mode)
• Anti-hallucination rules (No invented imports or variable changes)
• Preserves existing logic & architecture
• Works on Cursor, Windsurf, Claude & ChatGPT
...more
Added 17 hours ago
