Skip to content

Commit

Permalink
updated error statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
rimashah25 committed Aug 21, 2023
1 parent 59a0356 commit e8b3fd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ func TestProfileExists(t *testing.T) {
mock.ExpectQuery("SELECT").WillReturnRows(rows)
mock.ExpectCommit()

profileExists, err := ASNExists(db.MustBegin().Tx, testCase.id)
profileExists, err := ProfileExists(db.MustBegin().Tx, testCase.id)
if testCase.exists != profileExists {
t.Errorf("Expected return exists: %t, actual %t", testCase.exists, profileExists)
}
Expand Down
2 changes: 1 addition & 1 deletion traffic_ops/traffic_ops_golang/profile/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ func Delete(w http.ResponseWriter, r *http.Request) {
func readAndValidateJsonStruct(r *http.Request) (tc.ProfileV5, error) {
var profile tc.ProfileV5
if err := json.NewDecoder(r.Body).Decode(&profile); err != nil {
userErr := fmt.Errorf("error decoding POST request body into ASNV5 struct %w", err)
userErr := fmt.Errorf("error decoding POST request body into ProfilesV5 struct %w", err)
return profile, userErr
}

Expand Down

0 comments on commit e8b3fd1

Please sign in to comment.