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/12 16:53:53 UTC

[GitHub] [trafficcontrol] zrhoffman commented on issue #3079: POST to /api/x/federations does not properly validate request payload

zrhoffman commented on issue #3079:
URL: https://github.com/apache/trafficcontrol/issues/3079#issuecomment-758790983


   This now returns the correct response status code with a descriptive error message:
   ```json
   < HTTP/2 400
   < access-control-allow-credentials: true
   < access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
   < access-control-allow-methods: POST,GET,OPTIONS,PUT,DELETE
   < access-control-allow-origin: *
   < content-type: application/json
   * Replaced cookie mojolicious="eyJhdXRoX2RhdGEiOiJhZG1pbiIsImV4cGlyZXMiOjE2MTA0NzM1NjksImJ5IjoidHJhZmZpY2NvbnRyb2wtZ28tdG9jb29raWUifQ--046ad3a8a5149dfc7d0504cbf0b89409fd1b7aa2" for domain trafficops.infra.ciab.test, path /, expire 1610473569
   < set-cookie: mojolicious=eyJhdXRoX2RhdGEiOiJhZG1pbiIsImV4cGlyZXMiOjE2MTA0NzM1NjksImJ5IjoidHJhZmZpY2NvbnRyb2wtZ28tdG9jb29raWUifQ--046ad3a8a5149dfc7d0504cbf0b89409fd1b7aa2; Path=/; Expires=Tue, 12 Jan 2021 17:46:09 GMT; Max-Age=3600; HttpOnly
   < vary: Accept-Encoding
   < whole-content-sha512: hyl/oWMJdw/EmPWifc+GiVSLiMk3Ur1jeXsohAtaJcG2eCJPNIwJq2gUIqtswSkPGI0C70iedEdKaoP8E3MtPw==
   < x-server-name: traffic_ops_golang/
   < content-length: 134
   < date: Tue, 12 Jan 2021 16:46:09 GMT
   <
   {
     "alerts": [
       {
         "text": "validating request: must specify at least one Delivery Service/Federation Resolver(s) mapping",
         "level": "error"
       }
     ]
   }
   ```


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