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

Fixed error message when creating a new cachegroup with missing type #5421

Merged
merged 2 commits into from
Jan 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Traffic Ops: Added validation to ensure that the cachegroups of a delivery services' assigned ORG servers are present in the topology

### Fixed
- [#5287](https://github.com/apache/trafficcontrol/issues/5287) - Fixed error message when creating a Cache Group with no typeId
- [#5382](https://github.com/apache/trafficcontrol/issues/5382) - Fixed API documentation and TP helptext for "Max DNS Answers" field with respect to DNS, HTTP, Steering Delivery Service
- [#5396](https://github.com/apache/trafficcontrol/issues/5396) - Return the correct error type if user tries to update the root tenant
- [#5378](https://github.com/apache/trafficcontrol/issues/5378) - Updating a non existent DS should return a 404, instead of a 500
Expand Down
2 changes: 1 addition & 1 deletion lib/go-tc/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func GetTypeData(tx *sql.Tx, id int) (string, string, bool, error) {
// returns "" and an error if the typeID is invalid. If valid, the type's name is returned.
func ValidateTypeID(tx *sql.Tx, typeID *int, expectedUseInTable string) (string, error) {
if typeID == nil {
return "", errors.New("missing type")
return "", errors.New("missing property: 'typeId'")
}

typeName, useInTable, ok, err := GetTypeData(tx, *typeID)
Expand Down