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

Improve error message for proto payload converters #509

Merged
merged 3 commits into from
Aug 11, 2021

Conversation

alexshtin
Copy link
Member

@alexshtin alexshtin commented Aug 3, 2021

Previously this invalid code:

	var wt7 interface{}
	err = pc.FromPayload(payload, &wt7)

gave an error:

type: <nil>: type doesn't implement proto.Message

which is not quite informative. With this PR it will say:

value type: interface {}: must be a concrete type, not interface

which is better.

Same for:

	var wt8 proto.Message
	err = pc.FromPayload(payload, &wt8)

@alexshtin alexshtin force-pushed the feature/improve-error-message branch from 5aa1b49 to 6f1ffa5 Compare August 10, 2021 19:06
@alexshtin alexshtin merged commit 233adc6 into temporalio:master Aug 11, 2021
@alexshtin alexshtin deleted the feature/improve-error-message branch August 11, 2021 11:04
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

Successfully merging this pull request may close these issues.

2 participants