You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()
Here's an example of the same request using .ExecuteWebRequest()
One thing to note is that this request actually falls into the Exception ex instead of HttpOperationException httpex branch.
varex=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
.. 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.
The text was updated successfully, but these errors were encountered:
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()
Here's an example of the same request using
.ExecuteWebRequest()
One thing to note is that this request actually falls into the
Exception ex
instead ofHttpOperationException httpex
branch.I suspect the issue is here:
PowerPlatform-DataverseServiceClient/src/GeneralTools/DataverseClient/Client/ConnectionService.cs
Line 2628 in d78a53d
Using Fiddler to see the request that's being send, we can actually see that the request actually returns the correct error message
.. but the abstraction above works with
LastError
which is of typeException
, which is the reason we loseHttpOperationException.Response
which is why we lose the metadata of the actual error.Thank you.
The text was updated successfully, but these errors were encountered: