Add Error Handling & API Response Trait

Description

Create consistent error handling and API response formatting.

Acceptance Criteria

  • ApiResponse trait created
  • Global exception handler configured
  • 404 returns JSON for API routes
  • Validation errors properly formatted
  • Consistent response structure

Implementation Steps

  1. Create app/Traits/ApiResponse.php
  2. Update app/Exceptions/Handler.php
  3. Add renderables for common exceptions
  4. Test error responses

Reference

  • Roadmap: docs/roadmaps/Implementation_Roadmap_Backend.md Phase 8, Step 12
  • Standards: backend/CLAUDE.md - Error Handling section

Related Issues