Skip to content

Improve exception messages #23080

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
1 commit merged into from
Oct 23, 2020
Merged

Improve exception messages #23080

1 commit merged into from
Oct 23, 2020

Conversation

AndriySvyryd
Copy link
Member

Part of #7201

@AndriySvyryd AndriySvyryd requested a review from a team October 23, 2020 02:13
@@ -623,7 +623,10 @@
<value>No value was provided for the required parameter '{parameter}'.</value>
</data>
<data name="ModificationCommandInvalidEntityState" xml:space="preserve">
<value>Cannot save changes for an entity in state '{entityState}'.</value>
<value>Cannot save changes for an entity of type '{entityType} in state '{entityState}'. This may indicate a bug in Entity Framework, please report it. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the key values of the entity.</value>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<value>Cannot save changes for an entity of type '{entityType} in state '{entityState}'. This may indicate a bug in Entity Framework, please report it. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the key values of the entity.</value>
<value>Cannot save changes for an entity of type '{entityType}' in state '{entityState}'. This may indicate a bug in Entity Framework, please report it. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the key values of the entity.</value>

I think we have a fwlink for please report it some other exception messages. We should copy that.

Copy link
Member Author

Choose a reason for hiding this comment

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

I though we did, but I cannot find it.

Copy link
Contributor

Choose a reason for hiding this comment

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

<data name="CannotConvertQueryableToEnumerableMethod" xml:space="preserve">
<value>Unable to convert a queryable method to an enumerable method. This is likely an issue in Entity Framework, please file an issue at https://go.microsoft.com/fwlink/?linkid=2142044.</value>
</data>

@AndriySvyryd AndriySvyryd force-pushed the Issue7201 branch 2 times, most recently from 0b3bb01 to d42f304 Compare October 23, 2020 04:08
@ghost
Copy link

ghost commented Oct 23, 2020

Hello @AndriySvyryd!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit d24705b into main Oct 23, 2020
@ghost ghost deleted the Issue7201 branch October 23, 2020 07:35
This pull request was closed.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants