-
Notifications
You must be signed in to change notification settings - Fork 864
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
NullReferenceException in MetricsHandler when ResponseMetadata is null #3493
Comments
Hi @hwoodiwiss We’ll definitely look into this further, but I’m curious what interception library are you using? |
Hey @muhammad-othman, thanks for responding so quickly, I'm using an internal library built on top of https://github.com/justeattakeaway/httpclient-interception. Yeah that makes sense, I appreciate it's not a common use-case, I just thought it worth raising, in case we can blunt a slightly sharp edge. |
Needs review with the team. |
@ashishdhingra I've create #3496 to fix it since it was a very small change. |
Hi @hwoodiwiss, We wanted to let you know that the fix for this issue has been merged and is now available in version v3.7.400.27 of the Please update to this version, and the issue should now be resolved. If you encounter any further issues or have any questions, feel free to reach out. |
Comments on closed issues are hard for our team to see. |
Describe the bug
I'll preface this with the fact that I don't expect that this is likely/can happen in usual operation of the SDK against an actual AWS service.
While testing using an HTTP client interception library, in recent versions of AWSSDK.SimpleNotificationService, if the ResponseMetadata is not set in the response, a NullReferenceException is thrown in MetricsHandler.
Regression Issue
Expected Behavior
I would expect the metrics handler to handle the null case for ResponseMetadata more defensively, and then either throw a descriptive exception, or silently continue.
Current Behavior
Throws NullReferenceException dereferencing null ResponseMetadata when trying to set RequestId span attribute
Reproduction Steps
I'll have to get back to you with this later.
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.SimpleNotificationService 3.7.400.26 (though likely applies to several more as this will be based on the resolved AWSSDK.Core library version)
Targeted .NET Platform
.NET 8
Operating System and version
Windows 10, Ubuntu (CI Runner)
The text was updated successfully, but these errors were encountered: