Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Improve error message (#532)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <pingsutw@apache.org>
  • Loading branch information
pingsutw committed Mar 4, 2023
1 parent efe5b0c commit 9508833
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/manager/impl/validation/execution_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func CheckAndFetchInputsForExecution(
} else {
inputType := validators.LiteralTypeForLiteral(executionInputMap[name])
if !validators.AreTypesCastable(inputType, expectedInput.GetVar().GetType()) {
return nil, errors.NewFlyteAdminErrorf(codes.InvalidArgument, "invalid %s input wrong type", name)
return nil, errors.NewFlyteAdminErrorf(codes.InvalidArgument, "invalid %s input wrong type. Expected %s, but got %s", name, expectedInput.GetVar().GetType(), inputType)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/manager/impl/validation/execution_validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func TestValidateExecInputsWrongType(t *testing.T) {
lpRequest.Spec.FixedInputs,
lpRequest.Spec.DefaultInputs,
)
assert.EqualError(t, err, "invalid foo input wrong type")
assert.EqualError(t, err, "invalid foo input wrong type. Expected simple:STRING , but got simple:INTEGER ")
}

func TestValidateExecInputsExtraInputs(t *testing.T) {
Expand Down

0 comments on commit 9508833

Please sign in to comment.