Skip to content

Commit

Permalink
Correct typo in params.go
Browse files Browse the repository at this point in the history
Signed-off-by: Torkel Rogstad <[email protected]>
  • Loading branch information
torkelrogstad committed Jan 10, 2025
1 parent c1db73d commit c1efe3f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion params.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func setParameter(msg protoreflect.Message, fields []protoreflect.FieldDescripto
)
}
return connect.NewError(connect.CodeInvalidArgument,
fmt.Errorf("invalid parameter %q %w", fieldPath, err),
fmt.Errorf("invalid parameter %q: %w", fieldPath, err),
)
}

Expand Down
4 changes: 2 additions & 2 deletions params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func TestSetParameter(t *testing.T) {
fields: "enum_value",
value: "unknown",
want: &testv1.ParameterValues{},
wantErr: "invalid_argument: invalid parameter \"enum_value\" unknown enum: unknown",
wantErr: "invalid_argument: invalid parameter \"enum_value\": unknown enum: unknown",
}, {
fields: "enum_list",
value: "1",
Expand Down Expand Up @@ -371,7 +371,7 @@ func TestSetParameter(t *testing.T) {
fields: "string_map",
value: "hello",
want: &testv1.ParameterValues{},
wantErr: "invalid_argument: invalid parameter \"string_map\" unsupported message type vanguard.test.v1.ParameterValues.StringMapEntry",
wantErr: "invalid_argument: invalid parameter \"string_map\": unsupported message type vanguard.test.v1.ParameterValues.StringMapEntry",
}, {
fields: "nested_map.double_value",
value: "1.234",
Expand Down
2 changes: 1 addition & 1 deletion vanguard_restxrpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ func TestMux_RESTxRPC(t *testing.T) {
code: http.StatusBadRequest,
body: &status.Status{
Code: int32(connect.CodeInvalidArgument),
Message: "invalid parameter \"id\" invalid character 'a' in literal null (expecting 'u')",
Message: "invalid parameter \"id\": invalid character 'a' in literal null (expecting 'u')",
},
},
}, {
Expand Down

0 comments on commit c1efe3f

Please sign in to comment.