Skip to content

Conversation

@jj22ee
Copy link
Contributor

@jj22ee jj22ee commented Oct 25, 2025

Issue #, if available:
In UDP Exporter, when sending via the socket, our callback method will rethrow the error if there an error from the send. However, this is done asynchronously, so it isn't actually caught in the surrounding try/catch.

This err can happen when the UDP Packet size limit is reached. When this error is thrown, it can cause the following error in Lambda:

[ERROR] [1761253646458] LAMBDA_RUNTIME Failed to post handler success response. Http response code: 403. 
{
    "errorMessage": "State transition from RuntimeResponseSentState to InvocationErrorResponse failed for runtime. Error: State transition is not allowed",
    "errorType": "InvalidStateTransition"
}

Description of changes:

  • reject error, as opposed to throwing error because it cannot be caught in the existing surrounding try/catch.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jj22ee jj22ee requested a review from a team as a code owner October 25, 2025 00:46
@Jasonlin1198
Copy link

Can someone help review this so that it can be included in the next layer release?

@jj22ee
Copy link
Contributor Author

jj22ee commented Oct 29, 2025

Going to update this PR to continue to use Promise resolve/reject correctly.

@jj22ee jj22ee force-pushed the udp-exporter-not-throws branch from 4213fb0 to b491efc Compare October 31, 2025 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants