Skip to content

Conversation

@arturaz
Copy link

@arturaz arturaz commented Jan 15, 2024

Same thing that was provided for ember (http4s/http4s#7093).

Same thing that was provided for ember (http4s/http4s#7093).
Copy link
Member

@danicheg danicheg left a comment

Choose a reason for hiding this comment

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

This seems like a good addition to Blaze, but I suggest we consult Ross before making any decisions.

Comment on lines +67 to +69
/** @param maxWrite
* \@see [[SSLStageDefaults.MaxWrite]].
*/
Copy link
Member

Choose a reason for hiding this comment

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

It seems like missing scaladoc

final class SSLStage(
engine: SSLEngine,
maxWrite: Int,
sslHandshakeExceptionHandler: PartialFunction[Throwable, Unit]
Copy link
Member

Choose a reason for hiding this comment

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

If it's expected to handle SSLExceptions only, shouldn't the contract be PF[SSLException, Unit]?

*/
def withSslContext(
sslContext: SSLContext,
sslErrorHandler: PartialFunction[Throwable, Unit] = PartialFunction.empty,
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be more beneficial to have a general error handler exposed to users and not only for SSL exceptions?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

For what it's worth, Ember's general error handler just came up in http4s/http4s#7399. This is more in the direction that Ember is going, but probably away from the direction I'd prefer to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants