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

.Net: Include request metadata in KernelException if response cannot be serialized #6407

Conversation

markwallace-microsoft
Copy link
Member

@markwallace-microsoft markwallace-microsoft commented May 27, 2024

Motivation and Context

We include additional metadata in HttpOperationException i.e. request uri, payload, etc. When the response serialization fails we currently throw a KernelException which doesn't include the HTTP request metadata. This PR changes which exception is thrown to HttpOperationException so we have one type of exception for clients to catch and this includes all of the additional metadata . This is a behaviour change but it enables clients to catch a single exception and to get access to the request uri, payload, etc.

Description

Contribution Checklist

@markwallace-microsoft markwallace-microsoft requested a review from a team as a code owner May 27, 2024 09:57
@markwallace-microsoft markwallace-microsoft added the .NET Issue or Pull requests regarding .NET code label May 27, 2024
@github-actions github-actions bot changed the title Throw HttpOperationException is response cannot be serialized .Net: Throw HttpOperationException is response cannot be serialized May 27, 2024
@markwallace-microsoft markwallace-microsoft changed the title .Net: Throw HttpOperationException is response cannot be serialized .Net: Throw HttpOperationException if response cannot be serialized May 27, 2024
@markwallace-microsoft markwallace-microsoft force-pushed the users/markwallace/issue_6405 branch 2 times, most recently from a34e2bf to 673166b Compare May 29, 2024 16:16
@markwallace-microsoft markwallace-microsoft changed the title .Net: Throw HttpOperationException if response cannot be serialized .Net: Include request metadata in KernelException if response cannot be serialized May 29, 2024
@markwallace-microsoft markwallace-microsoft force-pushed the users/markwallace/issue_6405 branch 2 times, most recently from ba2f820 to bef67e0 Compare May 29, 2024 16:42
@markwallace-microsoft markwallace-microsoft added the kernel Issues or pull requests impacting the core kernel label May 29, 2024
…tion.cs

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
@markwallace-microsoft markwallace-microsoft added this pull request to the merge queue May 30, 2024
Merged via the queue into microsoft:main with commit 5195f03 May 30, 2024
15 checks passed
@markwallace-microsoft markwallace-microsoft deleted the users/markwallace/issue_6405 branch May 30, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel.core kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants