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

Incorrect key to throw CosmosExceptions with HttpStatusCode.Unauthorized status code #785

Merged
merged 7 commits into from
Sep 10, 2019

Conversation

ealsur
Copy link
Member

@ealsur ealsur commented Sep 9, 2019

Pull Request Template

Description

If the CosmosClient is initialized with an invalid key, we are throwing a DocumentClientException that is internal. This should be a CosmosException.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Closing issues

Closes #784

@ealsur ealsur added the bug Something isn't working label Sep 9, 2019
@ealsur ealsur requested a review from kirillg as a code owner September 9, 2019 23:41
@ealsur ealsur self-assigned this Sep 9, 2019
@ealsur ealsur added this to In progress in .NET v3 Board via automation Sep 9, 2019
@ealsur ealsur added this to In progress in Cosmos DB SDK team via automation Sep 9, 2019
kirillg
kirillg previously approved these changes Sep 10, 2019
Cosmos DB SDK team automation moved this from In progress to Reviewer approved Sep 10, 2019
.NET v3 Board automation moved this from In progress to Reviewer approved Sep 10, 2019
@kirankumarkolli
Copy link
Member

ChaneLog missing

Cosmos DB SDK team automation moved this from Reviewer approved to Review in progress Sep 10, 2019
.NET v3 Board automation moved this from Reviewer approved to Review in progress Sep 10, 2019
Copy link
Member

@kirankumarkolli kirankumarkolli left a comment

Choose a reason for hiding this comment

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

Please update changelog

changelog.md Outdated Show resolved Hide resolved
@kirankumarkolli kirankumarkolli changed the title Unauthorized errors during initialization Incorrect key to throw CosmosExceptions with HttpStatusCode.Unauthorized status code Sep 10, 2019
Cosmos DB SDK team automation moved this from Review in progress to Reviewer approved Sep 10, 2019
.NET v3 Board automation moved this from Review in progress to Reviewer approved Sep 10, 2019
@kirankumarkolli kirankumarkolli merged commit 4e749c7 into master Sep 10, 2019
Cosmos DB SDK team automation moved this from Reviewer approved to Done Sep 10, 2019
.NET v3 Board automation moved this from Reviewer approved to Done Sep 10, 2019
@kirankumarkolli kirankumarkolli deleted the users/ealsur/unauthorized branch September 10, 2019 17:40
@NRam0s
Copy link

NRam0s commented Oct 5, 2020

This is not working on Microsoft.Azure.Cosmos 3.13.0. I still get a DocumentClientException

@j82w
Copy link
Contributor

j82w commented Oct 5, 2020

@NRam0s can you create a new issue with more details on the scenario you are hitting this on? This PR added tests and the they are still passing so it shouldn't be throwing a DocumentClientException.

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
.NET v3 Board
  
Done
5 participants