Skip to content

Provide more specific error for failures during MQTT WS handshake #562

@NickDarvey

Description

@NickDarvey

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

/* 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CRT/IoTfeature-requestA feature should be added or improved.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions