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

The sender can't get the error message from receiver #783

Closed
wenfengwang opened this issue Jul 18, 2022 · 3 comments
Closed

The sender can't get the error message from receiver #783

wenfengwang opened this issue Jul 18, 2022 · 3 comments

Comments

@wenfengwang
Copy link
Contributor

Hi sdk-go community, I started a receiver like:

func receive(ctx context.Context, event cloudevents.Event) cloudevents.Result {
	fmt.Printf("Got an Event: %s", event)
	return cloudevents.NewHTTPResult(401, "test")
}

but the sender can't get the error message:
image

and I found in https://github.com/cloudevents/sdk-go/blob/main/v2/protocol/http/protocol.go#L366, that only StatusCode be used, but Format and Args are ignored.
image

I was wondering if it was a bug?

@n3wscott
Copy link
Member

Seems like a bug, want to fix?

@wenfengwang
Copy link
Contributor Author

Seems like a bug, want to fix?

OK, I will submit a PR to fix this.

@n3wscott
Copy link
Member

Thanks for the PR!!

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