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

Failed Request Returns default Instead of Throwing #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChrisGrohHS
Copy link

@ChrisGrohHS ChrisGrohHS commented Feb 6, 2019

Unknown exceptions cause the process to return default(T) instead of throwing. For example, the following code will generate a FaultException and return a null response.

var query = new QueryExpression("account");
query.Criteria.AddCondition("primarycontactid", ConditionOperator.Equal, new EntityReference("account", Guid.NewGuid()));
var response = await service.RetrieveMultipleAsync(query);
// response is null. 

This could be especially painful to troubleshoot for requests that callers might not normally check the response for like a Create or WinOpportunityRequest.

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.

1 participant