[ Bounty $8k ] [ API ] Add structured error responses with error codes — security critical
This issue proposes to standardize API error responses by introducing a consistent JSON schema that includes error codes, messages, and optional details. The goal is to improve clarity and security by ensuring all errors, including validation, not found, authentication, rate limiting, and internal errors, are handled uniformly and include a request ID.