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

Include error details in protovalidate responses #714

Merged
merged 3 commits into from
May 25, 2024

Commits on May 25, 2024

  1. protovalidate: refactor repetitive subtests

    The info struct is shared between all these subtests - there's no need
    to clutter up each test by redefining it.
    
    Signed-off-by: Akshay Shah <akshay@akshayshah.org>
    akshayjshah committed May 25, 2024
    Configuration menu
    Copy the full SHA
    01f9948 View commit details
    Browse the repository at this point in the history
  2. protovalidate: don't panic in streaming interceptor

    The streaming interceptor should match the behavior of the unary
    interceptor and gracefully handle non-protobuf messages.
    
    Signed-off-by: Akshay Shah <akshay@akshayshah.org>
    akshayjshah committed May 25, 2024
    Configuration menu
    Copy the full SHA
    6e75075 View commit details
    Browse the repository at this point in the history
  3. protovalidate: send violations as error details

    Amend the unary and streaming interceptors to send validation errors to
    the client as an error detail. This allows client code to easily parse
    and work with the structured validation information: for example, a UI
    might want to display validation errors next to the relevant fields in a
    form.
    
    Signed-off-by: Akshay Shah <akshay@akshayshah.org>
    akshayjshah committed May 25, 2024
    Configuration menu
    Copy the full SHA
    aec8785 View commit details
    Browse the repository at this point in the history