Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .last-botocore-check
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.43.108
1.43.110
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "boto3-errors"
version = "0.43.0"
version = "0.44.0"
description = "Typed, statically-importable exception classes for every AWS service"
readme = "README.md"
license = "MIT"
Expand Down Expand Up @@ -32,7 +32,7 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
"botocore>=1.43.108",
"botocore>=1.43.110",
]

[project.urls]
Expand Down
70 changes: 0 additions & 70 deletions src/boto3_errors/lambda_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,72 +13,11 @@ class AccessDeniedException(LambdaWebError):
_ERROR_CODE = "AccessDeniedException"


class ConflictException(LambdaWebError):
"""The request conflicts with the current state of the resource. Resolve the conflict
and try again.
"""

_ERROR_CODE = "ConflictException"

@property
def resource_id(self) -> str | None:
"""The identifier of the resource in conflict."""
return self.response.get("resourceId")

@property
def resource_type(self) -> str | None:
"""The type of the resource in conflict."""
return self.response.get("resourceType")


class InternalServerException(LambdaWebError):
"""An internal server error occurred. Try again later."""
_ERROR_CODE = "InternalServerException"


class ResourceNotFoundException(LambdaWebError):
"""The specified resource was not found. Verify the resource identifier and try again."""
_ERROR_CODE = "ResourceNotFoundException"

@property
def resource_id(self) -> str | None:
"""The identifier of the resource that was not found."""
return self.response.get("resourceId")

@property
def resource_type(self) -> str | None:
"""The type of the resource that was not found."""
return self.response.get("resourceType")


class ServiceQuotaExceededException(LambdaWebError):
"""A service quota was exceeded. Request a quota increase or reduce usage and try
again.
"""

_ERROR_CODE = "ServiceQuotaExceededException"

@property
def quota_code(self) -> str | None:
"""The quota code of the exceeded quota."""
return self.response.get("quotaCode")

@property
def resource_id(self) -> str | None:
"""The identifier of the resource that exceeded the quota."""
return self.response.get("resourceId")

@property
def resource_type(self) -> str | None:
"""The type of resource that exceeded the quota."""
return self.response.get("resourceType")

@property
def service_code(self) -> str | None:
"""The service code of the service that owns the quota."""
return self.response.get("serviceCode")


class ThrottlingException(LambdaWebError):
"""The request was throttled. Reduce the frequency of requests and try again."""
_ERROR_CODE = "ThrottlingException"
Expand All @@ -99,17 +38,8 @@ def service_code(self) -> str | None:
return self.response.get("serviceCode")


class ValidationException(LambdaWebError):
"""The request failed validation. Check the request parameters and try again."""
_ERROR_CODE = "ValidationException"


EXCEPTIONS: dict[str, type[LambdaWebError]] = {
"AccessDeniedException": AccessDeniedException,
"ConflictException": ConflictException,
"InternalServerException": InternalServerException,
"ResourceNotFoundException": ResourceNotFoundException,
"ServiceQuotaExceededException": ServiceQuotaExceededException,
"ThrottlingException": ThrottlingException,
"ValidationException": ValidationException,
}
12 changes: 6 additions & 6 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading