jhg03a opened a new issue #3090: Improve error reporting in API URL: https://github.com/apache/trafficcontrol/issues/3090 Some of our API endpoints handle database errors better than others. We should be more consistent in this. This is not a complete audit, but just a sample I've run across. Example: Most common working case: POST /api/1.3/divisions/kabletown/regions twice Response code 400 ``` "alerts": [ { "level": "error", "text": "region[kabletown] already exists." } ] ``` Inconsistent working case: POST /api/1.3/users twice Response code 400 ``` "alerts": [ { "level": "error", "text": "email is already taken" }, { "level": "error", "text": "username is already taken" } ] ``` Suboptimal case: POST /api/1.3/cachegroups twice Response code 500 ``` { "alerts": [ { "level": "error", "text": "Internal Server Error" } ] } ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
