Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloudEvent client error: “invalid CloudEvents value:(*string)(nil)” #991

Open
kycheng opened this issue Dec 15, 2023 · 1 comment
Open

Comments

@kycheng
Copy link

kycheng commented Dec 15, 2023

I used SetExtension to set a null pointer to string and got this error.

sdk-go/v2/types/value.go

Lines 146 to 150 in 39fe13d

if rx.Kind() == reflect.Ptr && !rx.IsNil() {
// Allow pointers-to convertible types
return Validate(rx.Elem().Interface())
}
return nil, fmt.Errorf("invalid CloudEvents value: %#v", v)

Code verification null pointer error.

Can we set data to zero value when we encounter null pointer?

@duglin
Copy link
Contributor

duglin commented Dec 15, 2023

Can you show me your code that calls this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants