Skip to content

Commit 41ab854

Browse files
committed
refactor: Remove MalformedRequestError class and relocate CountryCode import path.
1 parent 7ff2912 commit 41ab854

File tree

4 files changed

+1
-10
lines changed

4 files changed

+1
-10
lines changed

amazon_creatorsapi/core/parsers.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ def get_items_ids(items: str | list[str]) -> list[str]:
4242
Returns:
4343
A list of extracted ASINs.
4444
45-
Raises:
46-
InvalidArgumentError: If items is not a string or list.
47-
4845
"""
4946
if isinstance(items, str):
5047
items = items.split(",")

amazon_creatorsapi/errors.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ class InvalidArgumentError(AmazonCreatorsApiError):
99
"""Raised when an invalid argument is provided."""
1010

1111

12-
class MalformedRequestError(AmazonCreatorsApiError):
13-
"""Raised when the request is malformed."""
14-
15-
1612
class RequestError(AmazonCreatorsApiError):
1713
"""Raised when the API request fails."""
1814

@@ -34,7 +30,6 @@ class AssociateValidationError(AmazonCreatorsApiError):
3430
"AssociateValidationError",
3531
"InvalidArgumentError",
3632
"ItemsNotFoundError",
37-
"MalformedRequestError",
3833
"RequestError",
3934
"TooManyRequestsError",
4035
]

docs/pages/migration-guide-6.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ from amazon_creatorsapi.errors import (
155155
ItemsNotFoundError,
156156
TooManyRequestsError,
157157
AssociateValidationError,
158-
MalformedRequestError,
159158
RequestError,
160159
)
161160
```

tests/amazon_creatorsapi/api_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from creatorsapi_python_sdk.models.search_items_resource import SearchItemsResource
2626

2727
if TYPE_CHECKING:
28-
from amazon_creatorsapi.helpers import CountryCode
28+
from amazon_creatorsapi.core.marketplaces import CountryCode
2929

3030

3131
class TestAmazonCreatorsApi(unittest.TestCase):

0 commit comments

Comments
 (0)