You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux <hostname> 6.6.80 #1-NixOS SMP PREEMPT_DYNAMIC Thu Feb 27 12:10:54 UTC 2025 x86_64 GNU/Linux
Description
I'm writing tests to test error handling on bad user arguments and to ensure correct errors are returned. I fire requests sequentially, so nothing racy.
For some of my requests, tonic returns h2 protocol error: http2 error instead of the error I expect. I traced down my server code until I actually return a tonic::Status::invalid_argument from my server implementation method, but somehow it comes back as h2 protocol error: http2 error.
Since I'm dumping the full stack trace into the message passed into tonic::Status::invalid_argument, I thought maybe there are some limits on body size. Which seems to be the case. I shortened the message and it works fine.
This seems to be quite unintuitive. Why is there a limit on error body? Why is this not documented anywhere, but instead silently results in a weird internal http2 error?
The text was updated successfully, but these errors were encountered:
stevenroose
changed the title
My code returns tonic::Status::invalid_argument, tonic responds h2 protocol error: http2 error when message is too large
I get h2 protocol error: http2 error when the message in tonic::Status is too large
Mar 9, 2025
Thats a good question I can't think off the top of my head where that might be and we should def document that. I think it would be good to figure out where that is happening and to then add the appropriate docs for it.
Bug Report
Version
v0.12.3
Platform
Linux <hostname> 6.6.80 #1-NixOS SMP PREEMPT_DYNAMIC Thu Feb 27 12:10:54 UTC 2025 x86_64 GNU/Linux
Description
I'm writing tests to test error handling on bad user arguments and to ensure correct errors are returned. I fire requests sequentially, so nothing racy.
For some of my requests, tonic returns
h2 protocol error: http2 error
instead of the error I expect. I traced down my server code until I actually return atonic::Status::invalid_argument
from my server implementation method, but somehow it comes back ash2 protocol error: http2 error
.Since I'm dumping the full stack trace into the message passed into
tonic::Status::invalid_argument
, I thought maybe there are some limits on body size. Which seems to be the case. I shortened the message and it works fine.This seems to be quite unintuitive. Why is there a limit on error body? Why is this not documented anywhere, but instead silently results in a weird internal http2 error?
The text was updated successfully, but these errors were encountered: