trafficcontrol icon indicating copy to clipboard operation
trafficcontrol copied to clipboard

deliveryservice_requests POST request returns Internal Server Error

Open ericholguin opened this issue 5 years ago • 4 comments

I'm submitting a ...

  • [X] bug report
  • [ ] new feature / enhancement request
  • [ ] improvement request (usability, performance, tech debt, etc.)
  • [ ] other

Traffic Control components affected ...

  • [ ] CDN in a Box
  • [ ] Documentation
  • [ ] Grove
  • [ ] Traffic Control Client
  • [ ] Traffic Monitor
  • [X] Traffic Ops
  • [ ] Traffic Ops ORT
  • [ ] Traffic Portal
  • [ ] Traffic Router
  • [ ] Traffic Stats
  • [ ] Traffic Vault
  • [ ] unknown

Current behavior:

When making a POST request to deliveryservice_requests without the deliveryService key in the JSON body the response returned is:

HTTP/1.1 500 Internal Server Error
{
    "alerts": [
        {
            "text": "Internal Server Error",
            "level": "error"
        }
    ]
}

When making a POST request to deliveryservice_requests without the tenantId key in the JSON body the response returned is:

HTTP/1.1 500 Internal Server Error
{
    "alerts": [
        {
            "text": "Internal Server Error",
            "level": "error"
        }
    ]
}

Expected / new behavior:

Should return:

HTTP/1.1 400 Bad Request
{
    "alerts": [
        {
            "text": "'deliveryService' is required",
            "level": "error"
        }
    ]
}

AND

HTTP/1.1 400 Bad Request
{
    "alerts": [
        {
            "text": "'tenantId' is required",
            "level": "error"
        }
    ]
}

Minimal reproduction of the problem with instructions:

Anything else:

ericholguin avatar Feb 18 '20 20:02 ericholguin

Hi !!Can Work on this ??

SalvadorRomo avatar Jul 20 '22 17:07 SalvadorRomo

You can. Note that the problem is fixed in APIv4.

ocket8888 avatar Jul 20 '22 19:07 ocket8888

This issue is really interesting to solve, pls assign me this issue

Shrutakeerti avatar Nov 13 '23 06:11 Shrutakeerti

Feel free to open a PR, at which point you will be assigned should you wish.

ocket8888 avatar Nov 14 '23 01:11 ocket8888