Skip to content

Commit

Permalink
Add some error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
bretambrose committed Sep 19, 2024
1 parent f9a76b8 commit e26a55f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions include/aws/mqtt/mqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ enum aws_mqtt_error {
AWS_ERROR_MQTT_REQUEST_RESPONSE_INTERNAL_ERROR,
AWS_ERROR_MQTT_REQUEST_RESPONSE_PUBLISH_FAILURE,
AWS_ERROR_MQTT_REUQEST_RESPONSE_STREAM_ALREADY_ACTIVATED,
AWS_ERROR_MQTT_REQUEST_RESPONSE_MODELED_SERVICE_ERROR,
AWS_ERROR_MQTT_REQUEST_RESPONSE_PAYLOAD_PARSE_ERROR,
AWS_ERROR_MQTT_REQUEST_RESPONSE_INVALID_RESPONSE_PATH,

AWS_ERROR_END_MQTT_RANGE = AWS_ERROR_ENUM_END_RANGE(AWS_C_MQTT_PACKAGE_ID),
};
Expand Down
11 changes: 10 additions & 1 deletion source/mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,16 @@ bool aws_mqtt_is_valid_topic_filter(const struct aws_byte_cursor *topic_filter)
"Request-response operation failed because the associated publish failed synchronously."),
AWS_DEFINE_ERROR_INFO_MQTT(
AWS_ERROR_MQTT_REUQEST_RESPONSE_STREAM_ALREADY_ACTIVATED,
"Streaming operation activation failed because the operaation had already been activated."),
"Streaming operation activation failed because the operation had already been activated."),
AWS_DEFINE_ERROR_INFO_MQTT(
AWS_ERROR_MQTT_REQUEST_RESPONSE_MODELED_SERVICE_ERROR,
"Request-response operation failed with a modeled service error."),
AWS_DEFINE_ERROR_INFO_MQTT(
AWS_ERROR_MQTT_REQUEST_RESPONSE_PAYLOAD_PARSE_ERROR,
"Request-response operation failed due to an inability to parse the payload."),
AWS_DEFINE_ERROR_INFO_MQTT(
AWS_ERROR_MQTT_REQUEST_RESPONSE_INVALID_RESPONSE_PATH,
"Request-response operation failed due to arrival on an unknown response path"),
};
/* clang-format on */
#undef AWS_DEFINE_ERROR_INFO_MQTT
Expand Down

0 comments on commit e26a55f

Please sign in to comment.