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

protovalidate: Add custom ErrorConverter #711

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

khasanovbi
Copy link
Contributor

Changes

  • Fix validation for grpc stream, validate before message handling.
  • Add WithErrorConverter option to customize protovalidate output.

Verification

  • Add tests to related changes.
  • Check in my production.

@khasanovbi khasanovbi changed the title Add ErrorConverter to protovalidate protovalidate: Add custom ErrorConverter May 7, 2024
@johanbrandhorst
Copy link
Collaborator

Hi, could you please open an issue first to discuss this change? I'm not sure I understand/agree that this is necessary. Thanks!

}

return nil
return w.ServerStream.RecvMsg(m)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? From what I can tell, RecvMsg is unmarshalling data into m, so we should validate after calling it.

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.

3 participants