apple / swift-nio-http2

HTTP/2 support for SwiftNIO
https://swiftpackageindex.com/apple/swift-nio-http2/main/documentation/niohttp2
Apache License 2.0
465 stars 83 forks source link

the errors should have a better spelling #53

Open weissi opened 5 years ago

weissi commented 5 years ago

Currently, the error look like this:

NIOHTTP2Errors.NoSuchStream(...)

but I think it should be either

NIOHTTP2Error.noSuchStream(...) // imitating an open enum on top of a struct

or

NIOHTTP2Errors.NoSuchStreamError(...)

IMHO, preferably the former

natikgadzhi commented 1 year ago

If we do that, though, we should deprecate the existing ones, and leave them there for another release, right?

Lukasa commented 1 year ago

Yeah, but this is non-urgent enough that I’d be inclined to leave these until we did a new major release.