Fix Internal server error in update cachegroups by already exist cg name#6023
Fix Internal server error in update cachegroups by already exist cg name#6023dmohan001c wants to merge 0 commit intoapache:masterfrom
Conversation
There was a problem hiding this comment.
So since this might actually be a database error, this should still return an Internal Server Error in my opinion.
What you could do is add a check at the start of the Update method checking to see if the cachegroup with the given name(from the request body) has the same ID as that passed in the request. If true, then proceed, else, return a 400 or 409 status code with the correct error (something like cachegroup name should be unique).
Also, could you pls add some tests for this?
There was a problem hiding this comment.
Additionally, the tc.DBError is now deprecated. You can just return err in its place, and nil in place of the user error.
a8e5f6d to
90b04d2
Compare
|
This PR shows 0 files changed, was this a merge issue? |
90b04d2 to
96222fb
Compare
|
@dmohan001c Is there another PR that I need to review for this issue, since this one is closed? |
What does this PR (Pull Request) do?
This fixes the internal server error causing in update cache group with the already existing cache group name
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Execute all the Integration tests and make sure the tests are passed.
If this is a bug fix, what versions of Traffic Control are affected?
The following criteria are ALL met by this PR