ocket8888 opened a new issue #3147: POST to /api/1.x/types gives bad error message URL: https://github.com/apache/trafficcontrol/issues/3147 If a payload without a `useInTable` field is submitted in a `POST` request to the `/api/1.x/types` endpoint, it will return a `400 Bad Request` response with an `alerts` object that has the following `text`: ``` 'use_in_table' cannot be blank ``` This is confusing to users, because the actual field that cannot be blank is `useInTable`. It seems that the API "Cruder" is using the "db" name from the `TypeNullable` struct's ([lines 42 to 48 in `lib/go-tc/types.go`](https://github.com/apache/trafficcontrol/blob/master/lib/go-tc/types.go#L42-L48)) field decorators instead of the "json" name.
---------------------------------------------------------------- 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
