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

Inconsistent error message on Duplicate Detection while using ExecuteWebRequest #452

Open
metjuperry opened this issue May 24, 2024 · 1 comment
Labels
Investigating We are looking into this issue at this time.

Comments

@metjuperry
Copy link

Hello!

We've ran into and inconsistency when it comes to error messages returned by ExecuteWebRequest, especially in the case of the request failing because of Duplicate detection via Alternate Key.

Here's an example of fail message using .Create()

image

image

Here's an example of the same request using .ExecuteWebRequest()

image

image

One thing to note is that this request actually falls into the Exception ex instead of HttpOperationException httpex branch.

I suspect the issue is here:

var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));

Using Fiddler to see the request that's being send, we can actually see that the request actually returns the correct error message

image

.. but the abstraction above works with LastError which is of type Exception, which is the reason we lose HttpOperationException.Response which is why we lose the metadata of the actual error.

Thank you.

@MattB-msft MattB-msft added the Investigating We are looking into this issue at this time. label Jul 10, 2024
@metjuperry
Copy link
Author

@MattB-msft Any news on this issue? It's holding us back a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Investigating We are looking into this issue at this time.
Projects
None yet
Development

No branches or pull requests

2 participants