You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2023/01/10 09:14:52 UTC

[GitHub] [incubator-devlake] mindlesscloud commented on a diff in pull request #4172: fix: add unique index for the name of transformation rule

mindlesscloud commented on code in PR #4172:
URL: https://github.com/apache/incubator-devlake/pull/4172#discussion_r1065517834


##########
plugins/github/api/transformation_rule.go:
##########
@@ -63,12 +66,12 @@ func CreateTransformationRule(input *core.ApiResourceInput) (*core.ApiResourceOu
 // @Failure 500  {object} shared.ApiBody "Internal Error"
 // @Router /plugins/github/transformation_rules/{id} [PATCH]
 func UpdateTransformationRule(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error) {
-	transformationRuleId, err := strconv.ParseUint(input.Params["id"], 10, 64)
-	if err != nil {
-		return nil, errors.Default.Wrap(err, "the transformation rule ID should be an integer")
+	transformationRuleId, e := strconv.ParseUint(input.Params["id"], 10, 64)
+	if e != nil {
+		return nil, errors.Default.Wrap(e, "the transformation rule ID should be an integer")

Review Comment:
   The `ParseUint` returns a standard go-type error, but the function `IsDuplicationError` only accepts the `errors.Error` type variable.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org