Skip to content

Add stream error messages.#29

Merged
ioquatix merged 5 commits into
mainfrom
stream-error-messages
Jul 19, 2026
Merged

Add stream error messages.#29
ioquatix merged 5 commits into
mainfrom
stream-error-messages

Conversation

@ioquatix

Copy link
Copy Markdown
Member

Summary

  • Add Protocol::HTTP2::StreamError.for(code) with static messages for known HTTP/2 error codes.
  • Use the factory when closing streams due to non-refused RST_STREAM errors.
  • Add tests for known and unknown stream error codes.

Testing

  • ruby -Ilib -Itest -e 'require "protocol/http2/error"; error = Protocol::HTTP2::StreamError.for(Protocol::HTTP2::Error::CANCEL); abort error.message unless error.message == "Stream cancelled."; abort error.code.inspect unless error.code == 8; unknown = Protocol::HTTP2::StreamError.for(99); abort unknown.message unless unknown.message == "Unknown code: 99!"; abort unknown.code.inspect unless unknown.code == 99'

Notes

  • bundle exec sus ... is currently blocked locally because this checkout is missing several locked gem versions.

@ioquatix ioquatix changed the title Add stream error messages Add stream error messages. Jul 19, 2026
@ioquatix
ioquatix merged commit e1e769a into main Jul 19, 2026
38 of 40 checks passed
@ioquatix
ioquatix deleted the stream-error-messages branch July 19, 2026 07:30
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.

1 participant