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

CosmosException: Fixes the headers not matching CosmosException property values #2262

Merged
merged 5 commits into from
Mar 1, 2021

Conversation

j82w
Copy link
Contributor

@j82w j82w commented Feb 26, 2021

Pull Request Template

Description

  1. This change ensures that the values in the Headers and CosmoseException properties are always the same even if the header is updated. The header are mutable and would be out of sync with the CosmosException properties.

  2. Fixes a bug where the CosmosException headers could possibly be null. This has caused null ref exception because users always assume it is there.

  3. CosmosException would sometime record the substatus code as default 0. This was caused by a different bug which prevented the value from being parsed by the enum value. This changes the to string logic to directly use the header value to always capture it even if it is not a valid enum value.

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] This change requires a documentation update

Closing issues

To automatically close an issue: closes #IssueNumber

@j82w j82w added the bug Something isn't working label Feb 26, 2021
Copy link
Contributor

@nichatur nichatur left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants