Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Queries with invalid type parameter should return 400s, not 500s#4721

Merged
mattjackson220 merged 6 commits intoapache:masterfrom
srijeet0406:CDN-9218
Jun 1, 2020
Merged

Queries with invalid type parameter should return 400s, not 500s#4721
mattjackson220 merged 6 commits intoapache:masterfrom
srijeet0406:CDN-9218

Conversation

@srijeet0406
Copy link
Copy Markdown
Contributor

@srijeet0406 srijeet0406 commented May 26, 2020

What does this PR (Pull Request) do?

Which Traffic Control components are affected by this PR?

  • CDN in a Box
  • Documentation
  • Traffic Ops

What is the best way to verify this PR?

Setup TO locally and make a query like this GET /api/3.0/cachegroups?type=WRONG
This should return a 400, with the error details in it as the response.

If this is a bug fix, what versions of Traffic Control are affected?

master

The following criteria are ALL met by this PR

  • This PR includes tests OR I have explained why tests are unnecessary
  • This PR includes documentation OR I have explained why documentation is unnecessary
  • This PR includes an update to CHANGELOG.md OR such an update is not necessary
  • This PR includes any and all required license headers
  • This PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

Additional Information

@mattjackson220
Copy link
Copy Markdown
Contributor

one small change to the test and this looks good to me! unit and API tests pass, code looks good, go fmt is happy, works as expected. nice work!

@mattjackson220 mattjackson220 added bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops labels May 28, 2020
@mattjackson220
Copy link
Copy Markdown
Contributor

retest this please

@mattjackson220 mattjackson220 merged commit d8c1007 into apache:master Jun 1, 2020
@srijeet0406 srijeet0406 deleted the CDN-9218 branch June 1, 2020 17:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug something isn't working as intended 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 this pull request may close these issues.

Internal Server Error from /cachegroups parameter

3 participants