A good API should use a standardized response. Use [ProblemDetails](https://datatracker.ietf.org/doc/html/rfc7807) instead of the JSON used currently (with just a `reason` member).