-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Describe the feature
mqtt5_client_builder.websockets_with_default_aws_signing(...) raises a AWS_ERROR_HTTP_CALLBACK_FAILURE for both network errors and misconfiguration.
Use Case
For example, if I have a misconfigured client (like I connect with invalid client TLS details, or with a client identifier which I'm not authorized), I'd like to know about it so I can terminate the process because it's never going to connect. If it's a network issue, I'd like to let the MQTT client continue retrying to connect.
Proposed Solution
aws-crt-python/source/mqtt5_client.c
Lines 720 to 721 in c11a554
| /* TODO: Translate Python exception to aws error. In the meantime here's a catch-all. */ | |
| error_code = AWS_ERROR_HTTP_CALLBACK_FAILURE; |
:)
Using AwsCredentialProvider.get_credentials(...) I get AWS_IO_TLS_ERROR_NEGOTIATION_FAILURE and AWS_AUTH_CREDENTIALS_PROVIDER_HTTP_STATUS_FAILURE for the misconfigurations mentioned above, and AWS_IO_DNS_QUERY_FAILED and AWS_IO_DNS_INVALID_NAME for network issues.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change