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

Added exception unwinding and logging on MqttRelay module when connec… #67

Merged

Conversation

virizar
Copy link

@virizar virizar commented Jun 21, 2024

As discussed on #66, I have added unwinding of the exceptions and logging the inner exceptions and the base exception when the connection attempt of MqttRelay throws. Below an example of the output, which corresponds to the problem described in the issue

2024-06-21 03:18:35.4669|WARN|modules.mqtt-relay|MQTT Relay Connection Error : Authentication failed, see inner exception.
2024-06-21 03:18:35.4669|WARN|modules.mqtt-relay|MQTT Relay Connection Error (InnerException) : Authentication failed, see inner exception.
2024-06-21 03:18:35.4669|WARN|modules.mqtt-relay|MQTT Relay Connection Error (InnerException) : SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL.
2024-06-21 03:18:35.4669|WARN|modules.mqtt-relay|MQTT Relay Connection Error (InnerException) : error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate
2024-06-21 03:18:35.4669|WARN|modules.mqtt-relay|MQTT Relay Connection Error (BaseException) : Interop+Crypto+OpenSslCryptographicException: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate

Maybe this can be converted to a utility function that can be used all around the code, if you find it useful.

@PatrickRitchie PatrickRitchie merged commit d667cf2 into TrakHound:master Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants