Errors
Error response shapes
Section titled “Error response shapes”Most errors use one of these JSON shapes:
{ "msg": "..." }{ "error": "..." }Auth and Veterinarios endpoints
Section titled “Auth and Veterinarios endpoints”- Typically return
{ "msg": "..." }with400,403, or404status codes. - Auth middleware returns
403for missing or invalid tokens.
Pacientes endpoints
Section titled “Pacientes endpoints”- Ownership checks often return
200with{ "error": "accion no valida." }. - Not-found errors return
404with{ "error": "Paciente no encontrado." }.
These status code inconsistencies are part of the current API behavior.