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

Cosmos doesn't support pipe | in partition keys / document IDs #241

Open
JoshZA opened this issue Jan 29, 2023 · 0 comments
Open

Cosmos doesn't support pipe | in partition keys / document IDs #241

JoshZA opened this issue Jan 29, 2023 · 0 comments

Comments

@JoshZA
Copy link

JoshZA commented Jan 29, 2023

Using version: "@cfworker/cosmos": "1.13.5",

This doesn't work:

       const res = await this.client.getDocument<CustomerUser>({
            docId: 'User|105dbf77-a3bb-4688-9fc7-9506c96d52d6',
            partitionKey: 'User|105dbf77-a3bb-4688-9fc7-9506c96d52d6'
        });

Cosmos returns:

401
code: 'Unauthorized',
message: "The input authorization token can't serve the request. The wrong key is being used or the expected payload is not built as per the protocol.

Calls to similar documents without pipes in the Id/partition key work correctly

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

No branches or pull requests

1 participant