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 2021/01/07 17:02:00 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new issue #3147: POST to /api/1.x/types gives bad error message

ocket8888 opened a new issue #3147:
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 to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [trafficcontrol] ocket8888 commented on issue #3147: POST to /api/1.x/types gives bad error message

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #3147:
URL: https://github.com/apache/trafficcontrol/issues/3147#issuecomment-756244056


   This is not specific to API version 1 - that's just the only major version that existed when it was opened.


----------------------------------------------------------------
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.

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



[GitHub] [trafficcontrol] mitchell852 closed issue #3147: POST to /api/1.x/types gives bad error message

Posted by GitBox <gi...@apache.org>.
mitchell852 closed issue #3147:
URL: https://github.com/apache/trafficcontrol/issues/3147


   


----------------------------------------------------------------
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.

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



[GitHub] [trafficcontrol] mitchell852 commented on issue #3147: POST to /api/1.x/types gives bad error message

Posted by GitBox <gi...@apache.org>.
mitchell852 commented on issue #3147:
URL: https://github.com/apache/trafficcontrol/issues/3147#issuecomment-754747998


   1.x is going bye bye soon. closing this.


----------------------------------------------------------------
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.

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