You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/04/27 17:46:33 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new issue, #6791: Confusing error messages when creating a Topology

ocket8888 opened a new issue, #6791:
URL: https://github.com/apache/trafficcontrol/issues/6791

   ## This Improvement request (usability, performance, tech debt, etc.) affects these Traffic Control components:
   - Traffic Ops
   
   ## Current behavior:
   When creating a Topology where one or more nodes is missing the required `cachegroup` property, the error alert in the response will say
   > ```
   "'cachegroup  not found' node 0 references nonexistent cachegroup ",
   ```
   indicating that it's treating the missing property as though it had been provided with the value of the empty string. I discovered that by attempting to guess the structure of the request by using the `name` property to try to name the Cache Group of a node like
   ```json
   {
       "name": "dev",
       "nodes": [
           {
               "name": "dev"
           }
   }
   ```
   so it was a little confusing that it appeared to be telling me that the "dev" Cache Group doesn't exist - but it definitely does.
   
   Also, trying to create a Topology without specifying any nodes e.g. `topost -kp topologies '{"name": "dev"}'` returns an error-level alert with the text:
   
   > ```
   "'length' must provide 1 or more node, 0 found",
   ```
   
   which seems to be saying I specified an invalid `length` property.
   
   ## New behavior:
   When a property that is required is missing from a request, the resulting error-level alert should clearly state so in a format like
   > ```
   missing required property 'PROPERTY NAME'
   ```
   or similar.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org