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

Improve error message for TLS crypto errors #124

Open
tegefaulkes opened this issue Aug 15, 2024 · 1 comment
Open

Improve error message for TLS crypto errors #124

tegefaulkes opened this issue Aug 15, 2024 · 1 comment
Labels
development Standard development

Comments

@tegefaulkes
Copy link
Contributor

Specification

Recently when we were debugging an issue in Polykey we ran into the following error.

INFO:polykey.PolykeyAgent.NodeConnectionManager.NodeConnectionForward [13.239.117.143:1314].QUICClient:ErrorQUICConnectionPeerTLS: QUIC Connection local TLS error - Peer closed with transport code 301

For the sake of clarity, if we create TLS errors like this we should include the error name along with the code so we don't have to dig though the code to know what the error is. We already have a defined enum called CryptoError that provides the forward and reverse mapping for these codes. We just need to add this to the error description so we can see Peer closed with transport code 301 (CertificateExpired)

The same treatment can be applied to the ConnectionErrorCode enum usage as well.

Additional context

Related: MatrixAI/Polykey#787

Tasks

  1. when creating the message for ErrorQUICConnectionPeerTLS and ErrorQUICConnectionLocalTLS errors we want to use the CryptoError to include the name of the error code.
  2. The same needs to be applied to ConnectionErrorCode codes.
@tegefaulkes tegefaulkes added the development Standard development label Aug 15, 2024
Copy link

linear bot commented Aug 15, 2024

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

No branches or pull requests

1 participant