error-handling

Structured JSON error responses

Consistent error handling transforms debugging from guesswork into systematic troubleshooting. I use a rescue handler that catches exceptions globally and transforms them into a standard JSON structure containing an error code, human-readable message,