Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect error message creating Cache Group with no typeId #5287

Closed
ocket8888 opened this issue Nov 17, 2020 · 1 comment · Fixed by #5421
Closed

Incorrect error message creating Cache Group with no typeId #5287

ocket8888 opened this issue Nov 17, 2020 · 1 comment · Fixed by #5421
Assignees
Labels
bug something isn't working as intended good first issue first-time committers will find this easy to resolve low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops

Comments

@ocket8888
Copy link
Contributor

I'm submitting a ...

  • bug report

Traffic Control components affected ...

  • Traffic Ops

Current behavior:

Creating a Cache Group without specifying its Type (via the typeId property) gives the error message:

"missing type"

Expected behavior:

Should name the actual missing property: typeId.

Minimal reproduction of the problem with instructions:

Create a Cache Group without specifying it's type by ID, but providing the type property mentioned in the error message e.g.

{"name": "test", "type": "anything"}

Anything else:

HTTP Stack
POST /api/2.0/cachegroups HTTP/1.1
User-Agent: python-requests/2.24.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Cookie: mojolicious=...
Content-Length: 28

{"name": "test", "type": 23}

HTTP/1.1 400 Bad Request
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-Encoding: gzip
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; Expires=Tue, 17 Nov 2020 02:28:43 GMT; Max-Age=3600; HttpOnly
Vary: Accept-Encoding
X-Server-Name: traffic_ops_golang/
Date: Tue, 17 Nov 2020 01:28:43 GMT
Content-Length: 77

{
        "alerts": [
                {
                        "text": "missing type",
                        "level": "error"
                }
        ]
}
@ocket8888 ocket8888 added bug something isn't working as intended Traffic Ops related to Traffic Ops low impact affects only a small portion of a CDN, and cannot itself break one labels Nov 17, 2020
@mitchell852 mitchell852 added the good first issue first-time committers will find this easy to resolve label Nov 17, 2020
@rimashah25
Copy link
Contributor

I can take this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended good first issue first-time committers will find this easy to resolve low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants