You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
/* 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
The text was updated successfully, but these errors were encountered:
@bretambrose, I've updated to awscrt==0.20.10; awsiotsdk==1.21.5.
Unfortunately, I still get just one kind of error, though it's a different one now!
AWS_AUTH_SIGNING_NO_CREDENTIALS: Attempt to sign an http request without credentials
I get this error if I have no internet, but I also get the same error if I use an invalid client_id with mqtt_builder.websockets_with_default_aws_signing (that is a client_id for which I don't have the right IAM permissions).
That is the expected error that will be returned with any failure to source credentials for websocket handshake signing. I dont think it should be returned on a IAM policy failure though; I'll look into that when I can.
If I remove connect permissions from my IAM policy, the connection attempt fails with AWS_ERROR_MQTT5_CONNACK_CONNECTION_REFUSED: Remote endpoint rejected the CONNECT attempt by returning an unsuccessful CONNACK
If I use good credentials but target the wrong account, the connection attempt fails with AWS_ERROR_HTTP_WEBSOCKET_UPGRADE_FAILURE: Failed to upgrade HTTP connection to Websocket
Describe the feature
mqtt5_client_builder.websockets_with_default_aws_signing(...)
raises aAWS_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
:)
Using
AwsCredentialProvider.get_credentials(...)
I getAWS_IO_TLS_ERROR_NEGOTIATION_FAILURE
andAWS_AUTH_CREDENTIALS_PROVIDER_HTTP_STATUS_FAILURE
for the misconfigurations mentioned above, andAWS_IO_DNS_QUERY_FAILED
andAWS_IO_DNS_INVALID_NAME
for network issues.Other Information
No response
Acknowledgements
The text was updated successfully, but these errors were encountered: