Skip to content

Commit 1675099

Browse files
Rename is_throttle to is_throttling_error
1 parent 7046a16 commit 1675099

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/StructureGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class $1L($2T):
152152
${?retryable}
153153
is_retry_safe: bool | None = True
154154
${?throttling}
155-
is_throttle: bool = True
155+
is_throttling_error: bool = True
156156
${/throttling}
157157
${/retryable}
158158

codegen/core/src/main/java/software/amazon/smithy/python/codegen/integrations/HttpProtocolGeneratorUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public static void generateErrorDispatcher(
153153
return CallException(
154154
message=f"{code}: {message}",
155155
fault="client" if http_response.status < 500 else "server",
156-
is_throttle=is_throttle,
156+
is_throttling_error=is_throttle,
157157
is_retry_safe=is_throttle or None,
158158
)
159159
""",
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
is_retry_safe
22
retry_after
3-
is_throttle
3+
is_throttling_error
44
fault

designs/exceptions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ErrorRetryInfo(Protocol):
5757
Retry strategies MAY choose to wait longer.
5858
"""
5959

60-
is_throttle: bool = False
60+
is_throttling_error: bool = False
6161
"""Whether the error is a throttling error."""
6262
```
6363

@@ -120,5 +120,5 @@ class ServiceException(ModeledException):
120120
class ThrottlingException(ServcieException):
121121
fault: Fault = "client"
122122
is_retry_safe: bool | None = True
123-
is_throttle: bool = True
123+
is_throttling_error: bool = True
124124
```

packages/smithy-core/src/smithy_core/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class CallException(SmithyException):
4747
Retry strategies MAY choose to wait longer.
4848
"""
4949

50-
is_throttle: bool = False
50+
is_throttling_error: bool = False
5151
"""Whether the error is a throttling error."""
5252

5353
def __post_init__(self):

packages/smithy-core/src/smithy_core/interfaces/retries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ErrorRetryInfo(Protocol):
2424
Retry strategies MAY choose to wait longer.
2525
"""
2626

27-
is_throttle: bool = False
27+
is_throttling_error: bool = False
2828
"""Whether the error is a throttling error."""
2929

3030

0 commit comments

Comments
 (0)