Skip to content

Conversation

@ctaggart
Copy link
Contributor

@ctaggart ctaggart commented May 17, 2021

@ctaggart ctaggart changed the title add CosmosError and HttpError add HttpError, StreamError & CosmosError May 17, 2021
@ctaggart ctaggart marked this pull request as ready for review May 17, 2021 18:22
@ctaggart ctaggart requested review from MindFlavor and rylev May 17, 2021 18:22
Copy link
Contributor

@MindFlavor MindFlavor left a comment

Choose a reason for hiding this comment

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

I like this, great work!
Unfortunately the E2E tests are failing.
The repro is: cargo run --example create_delete_database dbname:

Error: GenericErrorWithText("String has an unrecognized part. Part: \"interopUsers=2000\", Full string: \"databases=1000;collections=5000;users=500000;permissions=2000000;interopUsers=2000;authPolicyElements=200000;\"")

Edit: it does not work on master either. I have created a separate issue (#256) so I would go ahead and merge this and tackle the bug in a separate PR.

@ctaggart
Copy link
Contributor Author

@MindFlavor, thanks for the steps to reproduce. I added support for interopUsers & authPolicyElements as part of the resource quota parsing. I see that it does not work on master either #256. This fixes it.

#[error("Failed to serialize request body as json: {}", 0)]
BodySerializationError(serde_json::Error),
#[error(
"Unexpected HTTP result (expected: {:?}, received: {:?}, body: {:?})",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes #212. I added body to the error message.

UnexpectedStatusCode {
expected: Vec<StatusCode>,
received: StatusCode,
body: String,
Copy link
Contributor Author

@ctaggart ctaggart May 18, 2021

Choose a reason for hiding this comment

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

In the services, I leave this as Bytes.

@ctaggart ctaggart linked an issue May 18, 2021 that may be closed by this pull request
@ctaggart ctaggart merged commit 457bd53 into Azure:master May 18, 2021
@ctaggart ctaggart deleted the CosmosError branch May 18, 2021 19:14
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.

CosmosDB create database fails with string has an unsupported starting token. Token: \"interopUsers=2000\" A way to see the error body

2 participants