|
8 | 8 | from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union
|
9 | 9 | import warnings
|
10 | 10 |
|
11 |
| -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error |
| 11 | +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error |
12 | 12 | from azure.core.pipeline import PipelineResponse
|
13 | 13 | from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
|
14 | 14 |
|
@@ -61,7 +61,9 @@ async def query(
|
61 | 61 | :raises: ~azure.core.exceptions.HttpResponseError
|
62 | 62 | """
|
63 | 63 | cls = kwargs.pop('cls', None) # type: ClsType["models.TableQueryResponse"]
|
64 |
| - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} |
| 64 | + error_map = { |
| 65 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 66 | + } |
65 | 67 | error_map.update(kwargs.pop('error_map', {}))
|
66 | 68 |
|
67 | 69 | _format = None
|
@@ -153,7 +155,9 @@ async def create(
|
153 | 155 | :raises: ~azure.core.exceptions.HttpResponseError
|
154 | 156 | """
|
155 | 157 | cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.TableResponse"]]
|
156 |
| - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} |
| 158 | + error_map = { |
| 159 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 160 | + } |
157 | 161 | error_map.update(kwargs.pop('error_map', {}))
|
158 | 162 |
|
159 | 163 | _format = None
|
@@ -240,7 +244,9 @@ async def delete(
|
240 | 244 | :raises: ~azure.core.exceptions.HttpResponseError
|
241 | 245 | """
|
242 | 246 | cls = kwargs.pop('cls', None) # type: ClsType[None]
|
243 |
| - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} |
| 247 | + error_map = { |
| 248 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 249 | + } |
244 | 250 | error_map.update(kwargs.pop('error_map', {}))
|
245 | 251 | accept = "application/json"
|
246 | 252 |
|
@@ -313,7 +319,9 @@ async def query_entities(
|
313 | 319 | :raises: ~azure.core.exceptions.HttpResponseError
|
314 | 320 | """
|
315 | 321 | cls = kwargs.pop('cls', None) # type: ClsType["models.TableEntityQueryResponse"]
|
316 |
| - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} |
| 322 | + error_map = { |
| 323 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 324 | + } |
317 | 325 | error_map.update(kwargs.pop('error_map', {}))
|
318 | 326 |
|
319 | 327 | _format = None
|
@@ -416,7 +424,9 @@ async def query_entities_with_partition_and_row_key(
|
416 | 424 | :raises: ~azure.core.exceptions.HttpResponseError
|
417 | 425 | """
|
418 | 426 | cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, object]]
|
419 |
| - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} |
| 427 | + error_map = { |
| 428 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 429 | + } |
420 | 430 | error_map.update(kwargs.pop('error_map', {}))
|
421 | 431 |
|
422 | 432 | _format = None
|
@@ -523,7 +533,9 @@ async def update_entity(
|
523 | 533 | :raises: ~azure.core.exceptions.HttpResponseError
|
524 | 534 | """
|
525 | 535 | cls = kwargs.pop('cls', None) # type: ClsType[None]
|
526 |
| - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} |
| 536 | + error_map = { |
| 537 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 538 | + } |
527 | 539 | error_map.update(kwargs.pop('error_map', {}))
|
528 | 540 |
|
529 | 541 | _format = None
|
@@ -628,7 +640,9 @@ async def merge_entity(
|
628 | 640 | :raises: ~azure.core.exceptions.HttpResponseError
|
629 | 641 | """
|
630 | 642 | cls = kwargs.pop('cls', None) # type: ClsType[None]
|
631 |
| - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} |
| 643 | + error_map = { |
| 644 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 645 | + } |
632 | 646 | error_map.update(kwargs.pop('error_map', {}))
|
633 | 647 |
|
634 | 648 | _format = None
|
@@ -729,7 +743,9 @@ async def delete_entity(
|
729 | 743 | :raises: ~azure.core.exceptions.HttpResponseError
|
730 | 744 | """
|
731 | 745 | cls = kwargs.pop('cls', None) # type: ClsType[None]
|
732 |
| - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} |
| 746 | + error_map = { |
| 747 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 748 | + } |
733 | 749 | error_map.update(kwargs.pop('error_map', {}))
|
734 | 750 |
|
735 | 751 | _format = None
|
@@ -816,7 +832,9 @@ async def insert_entity(
|
816 | 832 | :raises: ~azure.core.exceptions.HttpResponseError
|
817 | 833 | """
|
818 | 834 | cls = kwargs.pop('cls', None) # type: ClsType[Optional[Dict[str, object]]]
|
819 |
| - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} |
| 835 | + error_map = { |
| 836 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 837 | + } |
820 | 838 | error_map.update(kwargs.pop('error_map', {}))
|
821 | 839 |
|
822 | 840 | _format = None
|
@@ -917,7 +935,9 @@ async def get_access_policy(
|
917 | 935 | :raises: ~azure.core.exceptions.HttpResponseError
|
918 | 936 | """
|
919 | 937 | cls = kwargs.pop('cls', None) # type: ClsType[List["models.SignedIdentifier"]]
|
920 |
| - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} |
| 938 | + error_map = { |
| 939 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 940 | + } |
921 | 941 | error_map.update(kwargs.pop('error_map', {}))
|
922 | 942 | comp = "acl"
|
923 | 943 | accept = "application/xml"
|
@@ -990,7 +1010,9 @@ async def set_access_policy(
|
990 | 1010 | :raises: ~azure.core.exceptions.HttpResponseError
|
991 | 1011 | """
|
992 | 1012 | cls = kwargs.pop('cls', None) # type: ClsType[None]
|
993 |
| - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} |
| 1013 | + error_map = { |
| 1014 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 1015 | + } |
994 | 1016 | error_map.update(kwargs.pop('error_map', {}))
|
995 | 1017 | comp = "acl"
|
996 | 1018 | content_type = kwargs.pop("content_type", "application/xml")
|
|
0 commit comments