Describe the bug
Running the settings command against a container in a serverless Azure Cosmos DB for NoSQL account fails.
The command path attempts to access /offers, which is unsupported for serverless accounts, and surfaces a raw SDK BadRequest exception.
Impact
- Users cannot use
settings successfully on serverless accounts.
- Error appears as a low-level SDK failure instead of a clear capability message.
Steps to reproduce
- Connect CosmosDBShell to a serverless Azure Cosmos DB for NoSQL account.
- Navigate to a container, e.g.
productcatalog/products.
- Run
settings.
Expected behavior
settings should succeed for supported operations.
- Any serverless-unsupported settings should be hidden/disabled or clearly reported as unsupported.
- User-facing message should explain that offer/throughput operations are not available on serverless accounts.
Actual behavior
The command fails with:
Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 9329a313-8bba-4a0f-b41a-6735d839429a;
Reason: {"code":"BadRequest","message":"Reading or replacing offers is not supported for serverless accounts.\\r\\nActivityId: 9329a313-8bba-4a0f-b41a-6735d839429a, Microsoft.Azure.Documents.Common/2.14.0"}
RequestUri: https://ai-vercel-cosmosdb-westus2.documents.azure.com/offers;
RequestMethod: POST;
SDK: Windows/10.0.26100 cosmos-netstandard-sdk/3.42.2;
Environment
- OS: Windows 10.0.26100
- Account type: Serverless Azure Cosmos DB for NoSQL
- Cosmos SDK user-agent observed: cosmos-netstandard-sdk/3.42.2
Suggested fix
- Detect serverless capability before entering offer/throughput settings flows.
- Do not call
/offers for serverless accounts.
- Return actionable UX text:
Throughput/offer settings are not supported for serverless accounts.
Describe the bug
Running the
settingscommand against a container in a serverless Azure Cosmos DB for NoSQL account fails.The command path attempts to access
/offers, which is unsupported for serverless accounts, and surfaces a raw SDK BadRequest exception.Impact
settingssuccessfully on serverless accounts.Steps to reproduce
productcatalog/products.settings.Expected behavior
settingsshould succeed for supported operations.Actual behavior
The command fails with:
Environment
Suggested fix
/offersfor serverless accounts.Throughput/offer settings are not supported for serverless accounts.