Skip to content

Commit

Permalink
Merge pull request #5021 from jackchenjc/issue-5018
Browse files Browse the repository at this point in the history
fix: Revise response status code of create device API
  • Loading branch information
cloudxxx8 authored Dec 10, 2024
2 parents 2eb6d4b + c33ac6e commit b30e0ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/core/metadata/application/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func validateProfileAndAutoEvent(dic *di.Container, d models.Device) errors.Edge
dbClient := container.DBClientFrom(dic.Get)
dp, err := dbClient.DeviceProfileByName(d.ProfileName)
if err != nil {
return errors.NewCommonEdgeX(errors.Kind(err), fmt.Sprintf("device profile '%s' not found during validating device '%s'", d.ProfileName, d.Name), err)
return errors.NewCommonEdgeX(errors.KindContractInvalid, fmt.Sprintf("device profile '%s' not found during validating device '%s'", d.ProfileName, d.Name), err)
}
if len(d.AutoEvents) == 0 {
return nil
Expand Down

0 comments on commit b30e0ec

Please sign in to comment.