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

Improve exception messages #10894

Merged
merged 1 commit into from
Feb 6, 2018
Merged

Improve exception messages #10894

merged 1 commit into from
Feb 6, 2018

Conversation

AndriySvyryd
Copy link
Member

@AndriySvyryd AndriySvyryd commented Feb 6, 2018

Add key values to SaveChanges circular dependency message
Update transient error message to not reference SqlAzureExecutionStrategy
Add key values to the conceptual null exception
Don't validate mapping for shadow properties created by convention
Add incompatible principal entity during fixup exception
Don't reference 'Property' in property is already a navigation exception

Fixes #8363
Fixes #8365
Fixes #9696
Fixes #9817
Fixes #10135
Fixes #10856

/// <summary>
/// This API supports the Entity Framework Core infrastructure and is not intended to be used
/// directly from your code. This API may change or be removed in future releases.
/// </summary>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private method

<value>The foreign key {foreignKey} set on '{dependentEntityType}' matches an entity of type '{foundPrincipalEntityType}', however the principal entity type should be assignable to '{principalEntityType}'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the key values.</value>
</data>
<data name="IncompatiblePrincipalEntrySensitive" xml:space="preserve">
<value>The foreign key '{foreignKeyValues}' set on '{dependentEntityType}' with the key value '{keyValue}' matches an entity of type '{foundPrincipalEntityType}', however the principal entity type should be assignable to '{principalEntityType}'.</value>
Copy link
Contributor

@smitpatel smitpatel Feb 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sensitivedata logging?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not realize it was already sensitive. Ignore.

Update transient error message
Add sensitive data to the conceptual null exception
Don't validate mapping for shadow properties created by convention
Improve incompatible principal entity during fixup exception
Correct property is already a navigation exception

Fixes #8363
Fixes #8365
Fixes #9696
Fixes #9817
Fixes #10135
Fixes #10856
@AndriySvyryd AndriySvyryd merged commit 779d0ef into dev Feb 6, 2018
@smitpatel smitpatel deleted the Issue10856 branch February 11, 2018 19:13
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.

3 participants