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

error handling improvements #107

Merged
merged 29 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cfe9fb9
add a secure tunnel encode error and logging for errors during encodi…
sbSteveK Apr 12, 2024
b7e3f79
encode failure error
sbSteveK Apr 12, 2024
eac0841
more error cleanup
sbSteveK Apr 12, 2024
734e77f
log fix
sbSteveK Apr 12, 2024
0bf3638
returns when function is void
sbSteveK Apr 12, 2024
b29444b
more error stuff
sbSteveK Apr 15, 2024
d98600e
tries to remove with no error state
sbSteveK Apr 15, 2024
d6c8d14
handle more error results
sbSteveK Apr 15, 2024
4102f17
further error handling
sbSteveK Apr 16, 2024
9a204b3
test checks last error instead of return code
sbSteveK Apr 16, 2024
d50be30
assert that the send message failed
sbSteveK Apr 16, 2024
e541a99
report proper error during operation failures
sbSteveK Apr 18, 2024
1575116
Merge branch 'main' into secure-tunnel-error-handling
sbSteveK Apr 22, 2024
0150d0c
Merge branch 'main' into secure-tunnel-error-handling
sbSteveK Jun 13, 2024
efc2297
goto error
sbSteveK Jun 13, 2024
4abd149
remove unecessary error_code member
sbSteveK Jun 13, 2024
3f54ffa
change debug to warn log
sbSteveK Jun 13, 2024
9d9d835
remove unused function
sbSteveK Jun 14, 2024
cc6dee5
fully remove unused function
sbSteveK Jun 14, 2024
aad5078
cleaning
sbSteveK Jun 17, 2024
7e9f895
remove unecessary aws_raise_error()
sbSteveK Jun 17, 2024
1da2903
remove uneccessary AWS_ASSERT()
sbSteveK Jun 17, 2024
0c31c79
revert websocket order
sbSteveK Jun 18, 2024
3d25882
remove commented code
sbSteveK Jun 18, 2024
c6e8e66
cleanup
sbSteveK Jun 18, 2024
b3f2550
label needs to be followed by a statement
sbSteveK Jun 18, 2024
a90d5ef
AWS_OP_SUCCESS -> AWS_ERROR_SUCCESS where we are using error codes
sbSteveK Jul 17, 2024
df7c37c
Merge branch 'main' into secure-tunnel-error-handling
sbSteveK Jul 18, 2024
a95b385
check for correct validation error in payload exceed test
sbSteveK Jul 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/aws/iotdevice/iotdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ enum aws_iotdevice_error {
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_DATA_NO_ACTIVE_CONNECTION,
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_DATA_PROTOCOL_VERSION_MISMATCH,
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_INACTIVE_SERVICE_ID,
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_ENCODE_FAILURE,

AWS_ERROR_END_IOTDEVICE_RANGE = AWS_ERROR_ENUM_END_RANGE(AWS_C_IOTDEVICE_PACKAGE_ID),
};
Expand Down
4 changes: 0 additions & 4 deletions include/aws/iotdevice/private/secure_tunneling_operations.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ AWS_IOTDEVICE_API void aws_secure_tunnel_operation_complete(
int error_code,
const void *associated_view);

AWS_IOTDEVICE_API void aws_secure_tunnel_operation_assign_stream_id(
struct aws_secure_tunnel_operation *operation,
struct aws_secure_tunnel *secure_tunnel);

AWS_IOTDEVICE_API int32_t
aws_secure_tunnel_operation_get_stream_id(const struct aws_secure_tunnel_operation *operation);

Expand Down
5 changes: 4 additions & 1 deletion source/iotdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static struct aws_error_info s_errors[] = {
"Secure Tunnel terminated by user request."),
AWS_DEFINE_ERROR_INFO_IOTDEVICE(
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_DECODE_FAILURE,
"Error occured while decoding an incoming message." ),
"Error occurred while decoding an incoming message." ),
AWS_DEFINE_ERROR_INFO_IOTDEVICE(
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_DATA_NO_ACTIVE_CONNECTION,
"DATA message processing failed due to no active connection found." ),
Expand All @@ -102,6 +102,9 @@ static struct aws_error_info s_errors[] = {
AWS_DEFINE_ERROR_INFO_IOTDEVICE(
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_INACTIVE_SERVICE_ID,
"Secure Tunnel operation failed due to using inactive service id." ),
AWS_DEFINE_ERROR_INFO_IOTDEVICE(
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_ENCODE_FAILURE,
"Error occured while encoding an outbound message." ),
};
/* clang-format on */
#undef AWS_DEFINE_ERROR_INFO_IOTDEVICE
Expand Down
Loading