-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
More clearly log details about SSL errors #259
Comments
For the repro, I was able to just try the HTTPS example in a 5.0.0 switch with all the latest opam packages and Dream |
It looks like the issue here isn't that messages aren't logged -- the above messages end with
the issue is that this appears at the very end of the log message, where it is clipped by Dream's own default terminal settings. It should be moved to the front of the message, and the numeric details can be displayed later. So, depending on the API of the SSL bindings, this might actually be an easy issue. |
For context, the current format comes from the printer registered in ocaml-ssl. This calls ocaml-ssl doesn't seem have bindings to obtain the error code and call |
If these things are available in SSL in C, it seems better (as I'm sure you agree!) to provide bindings to them, rather than parse these strings. So maybe this isn't a good first issue after this point, but it is an upstream issue. Thank you! |
@devvydeebug would you be willing to open an issue at savonet/ocaml-ssl about this? Maybe they would like to add bindings, or can provide other info. |
An alternative would be to just rearrange the error output in the printer, though I'm afraid that could cause pain to someone that is parsing the messages 😆 |
@aantron Agreed, parsing is always messy. I'll open an issue there. Absolute worst case, catching the exception before |
At the moment, SSL errors and warnings server-side look like this in the log:
The number
0A000416
can probably be decoded using the SSL bindings to give the human readers some more-useful information.EDIT: the information is already in the message, just at the very end -- see #259 (comment). It just needs to be moved forward so that it's actually likely to be seen by a developer or devops user.
The text was updated successfully, but these errors were encountered: