Skip to content

Commit 7258166

Browse files
authored
Update README.md
1 parent 44455a9 commit 7258166

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,17 @@ Use-CosmosDbInternalFlag -EnableFiddlerDebugging $true
244244
| EnableFiddlerDebugging | Sets the `az` flag `env:AZURE_CLI_DISABLE_CONNECTION_VERIFICATION` which enables `az` commands with a Fiddler proxy | No - default is disabled |
245245
| EnableCaching | Enables caching certain values like DB keys, partition ranges, etc. Improves performance of nearly all operations. | No - default is enabled |
246246
| EnablePartitionKeyRangeSearches | **[Experimental]** Enables filtering `Search` queries to relevant partition ranges instead of a full scan. Improves performance of `Search` commands. | No - default is disabled |
247+
248+
## Error Handling
249+
250+
Any failed requests to the Cosmos DB API are returned from the calling command in the following format:
251+
252+
```json
253+
{
254+
"StatusCode": 404,
255+
"Content": "{\"Message\":\"...\" ...}",
256+
"RawResponse": { "<HttpResponseMessage (PS7) or WebResponse (PS5)>" }
257+
}
258+
```
259+
260+
Failed reponsed can be piped into `Get-CosmosDbRecordContent` in the same way as successful messages. It will check for common issues (record not found, DB not found, throttling, etc) and throw an appropriate message.

0 commit comments

Comments
 (0)