@azure/ai-text-analytics 5.2.0-alpha.20211103.1 → 5.2.0-alpha.20211215.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -67,7 +67,7 @@ To create a client object to access the Text Analytics API, you will need the `e
67
67
  You can find the endpoint for your text analytics resource either in the [Azure Portal][azure_portal] or by using the [Azure CLI][azure_cli] snippet below:
68
68
 
69
69
  ```bash
70
- az cognitiveservices account show --name <your-resource-name> --resource-group <your-resource-group-name> --query "endpoint"
70
+ az cognitiveservices account show --name <your-resource-name> --resource-group <your-resource-group-name> --query "properties.endpoint"
71
71
  ```
72
72
 
73
73
  #### Using an API Key
package/dist/index.js CHANGED
@@ -4140,6 +4140,9 @@ function appendReadableErrorMessage(currentMessage, innerMessage) {
4140
4140
  function compileError(errorResponse) {
4141
4141
  var _a;
4142
4142
  const castErrorResponse = errorResponse;
4143
+ if (!castErrorResponse.response) {
4144
+ throw errorResponse;
4145
+ }
4143
4146
  const topLevelError = (_a = castErrorResponse.response.parsedBody) === null || _a === void 0 ? void 0 : _a.error;
4144
4147
  if (!topLevelError)
4145
4148
  return errorResponse;