You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -469,7 +469,7 @@ from azure.core.pipeline.policies import (
469
469
||| retry_status | x | x | How many times to retry on bad status codes. Default value is `3`. |
470
470
||| retry_backoff_factor | x | x | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |
471
471
||| retry_backoff_max | x | x | The maximum back off time. Default value is `120` seconds (2 minutes). |
472
-
||| retry_mode | x | x | Fixed or exponential delay between attemps, default is `exponential`. |
472
+
||| retry_mode | x | x | Fixed or exponential delay between attempts, default is `exponential`. |
473
473
||| timeout | x | x | Timeout setting for the operation in seconds, default is `604800s` (7 days). |
474
474
| AsyncRetryPolicy | AsyncHTTPPolicy |||||
475
475
||| retry_total | x | x | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |
@@ -478,7 +478,7 @@ from azure.core.pipeline.policies import (
478
478
||| retry_status | x | x | How many times to retry on bad status codes. Default value is `3`. |
479
479
||| retry_backoff_factor | x | x | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |
480
480
||| retry_backoff_max | x | x | The maximum back off time. Default value is `120` seconds (2 minutes). |
481
-
||| retry_mode | x | x | Fixed or exponential delay between attemps, default is exponential. |
481
+
||| retry_mode | x | x | Fixed or exponential delay between attempts, default is exponential. |
482
482
||| timeout | x | x | Timeout setting for the operation in seconds, default is `604800s` (7 days). |
Copy file name to clipboardExpand all lines: sdk/core/azure-core/README.md
+43-20Lines changed: 43 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ If you are a client library developer, please reference [client library develope
10
10
11
11
## _Disclaimer_
12
12
13
-
_Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
13
+
_Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For more information and questions, please refer to <https://github.com/Azure/azure-sdk-for-python/issues/20691>_
14
14
15
15
## Getting started
16
16
@@ -24,56 +24,61 @@ you can find it [here](https://pypi.org/project/azure-core/).
*message* is any message (str) to be associated with the exception.
40
43
41
44
*args* are any additional args to be included with exception.
42
45
43
-
*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception.
46
+
*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.
44
47
45
48
**The following exceptions inherit from AzureError:**
46
49
47
50
#### ServiceRequestError
51
+
48
52
An error occurred while attempt to make a request to the service. No request was sent.
49
53
50
54
#### ServiceResponseError
55
+
51
56
The request was sent, but the client failed to understand the response.
52
57
The connection may have timed out. These errors can be retried for idempotent or safe operations.
53
58
54
59
#### HttpResponseError
60
+
55
61
A request was made, and a non-success status code was received from the service.
*message* is the HTTP response error message (optional)
78
83
79
84
*response* is the HTTP response (optional).
@@ -83,25 +88,37 @@ class HttpResponseError(AzureError):
83
88
**The following exceptions inherit from HttpResponseError:**
84
89
85
90
#### DecodeError
86
-
An error raised during response deserialization.
91
+
92
+
An error raised during response de-serialization.
93
+
94
+
#### IncompleteReadError
95
+
96
+
An error raised if peer closes the connection before we have received the complete message body.
87
97
88
98
#### ResourceExistsError
99
+
89
100
An error response with status code 4xx. This will not be raised directly by the Azure core pipeline.
90
101
91
102
#### ResourceNotFoundError
92
-
An error response, typically triggered by a 412 response (for update) or 404 (for get/post).
93
103
94
-
#### ClientAuthenticationError
95
-
An error response with status code 4xx. This will not be raised directly by the Azure core pipeline.
104
+
An error response, typically triggered by a 412 response (for update) or 404 (for get/post).
96
105
97
106
#### ResourceModifiedError
107
+
98
108
An error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.
99
109
100
110
#### ResourceNotModifiedError
111
+
101
112
An error response with status code 304. This will not be raised directly by the Azure core pipeline.
102
113
114
+
#### ClientAuthenticationError
115
+
116
+
An error response with status code 4xx. This will not be raised directly by the Azure core pipeline.
117
+
103
118
#### TooManyRedirectsError
119
+
104
120
An error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.
121
+
105
122
```python
106
123
classTooManyRedirectsError(HttpResponseError):
107
124
def__init__(self, history, *args, **kwargs):
@@ -117,14 +134,17 @@ class TooManyRedirectsError(HttpResponseError):
117
134
*kwargs* are keyword arguments to include with the exception.
118
135
119
136
#### StreamConsumedError
137
+
120
138
An error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once
121
139
the response stream has been consumed.
122
140
123
141
#### StreamClosedError
142
+
124
143
An error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once
125
144
the response stream has been closed.
126
145
127
146
#### ResponseNotReadError
147
+
128
148
An error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before
129
149
reading in the response's bytes first.
130
150
@@ -153,7 +173,7 @@ When calling the methods, some properties can be configured by passing in as kwa
153
173
| retry_status | How many times to retry on bad status codes. Default value is `3`. |
154
174
| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |
155
175
| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |
156
-
| retry_mode | Fixed or exponential delay between attemps, default is `Exponential`. |
176
+
| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |
157
177
| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |
158
178
| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |
159
179
| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |
@@ -172,6 +192,7 @@ The async transport is designed to be opt-in. [AioHttp](https://pypi.org/project
172
192
#### MatchConditions
173
193
174
194
MatchConditions is an enum to describe match conditions.
195
+
175
196
```python
176
197
classMatchConditions(Enum):
177
198
Unconditionally =1
@@ -184,6 +205,7 @@ class MatchConditions(Enum):
184
205
#### CaseInsensitiveEnumMeta
185
206
186
207
A metaclass to support case-insensitive enums.
208
+
187
209
```python
188
210
from enum import Enum
189
211
from six import with_metaclass
@@ -211,6 +233,7 @@ foo = Foo(
211
233
```
212
234
213
235
## Contributing
236
+
214
237
This project welcomes contributions and suggestions. Most contributions require
215
238
you to agree to a Contributor License Agreement (CLA) declaring that you have
216
239
the right to, and actually do, grant us the rights to use your contribution.
0 commit comments