error-handling
Error Handling
Quick Start
When handling errors:
- Never expose technical details to users
- Log errors server-side with context
- Provide user-friendly error messages
- Use appropriate HTTP status codes
- Implement error recovery when possible
Common Patterns
API Error Handling
import { NextRequest, NextResponse } from 'next/server';
More from santiagoxor/pintureria-digital
checkout-payments
Specialized skill for working with checkout and payment systems including MercadoPago integration, order management, address validation, and checkout flow. Use when implementing checkout improvements, integrating payment methods, debugging payment issues, or optimizing checkout process.
63authentication
Specialized skill for working with NextAuth.js authentication including session management, JWT tokens, role-based access control, and protected routes. Use when implementing authentication features, securing routes, managing user sessions, or debugging auth issues.
34postgres-best-practices
Postgres performance optimization guidelines from Supabase. Contains rules across 8 categories prioritized by impact. Use when writing SQL queries, designing schemas, implementing indexes, optimizing queries, reviewing database performance, configuring connection pooling, or working with Row-Level Security (RLS).
29testing-qa
Specialized skill for writing and maintaining tests including unit tests, integration tests, E2E tests with Playwright, and accessibility tests. Use when writing tests for new features, debugging failed tests, improving test coverage, or setting up E2E tests.
18lighthouse-audit
Specialized skill for running Lighthouse audits, analyzing Core Web Vitals, identifying performance opportunities, and generating performance reports. Use when auditing performance, analyzing Lighthouse metrics, optimizing Core Web Vitals, or generating performance reports.
17git-commit-push
Automates git commit and push workflow with descriptive commit messages. Analyzes changes, generates conventional commit messages, stages files, commits, and pushes to remote. Use when the user asks to commit changes, push code, or save work to git.
17