Exceptions API¶
exceptions
¶
Exception classes for Playfast.
Provides structured error handling for Google Play Store scraping operations.
PlayfastError
¶
AppNotFoundError
¶
Bases: PlayfastError
Raised when an app cannot be found on Google Play.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app_id
|
str
|
The app ID that was not found |
required |
message
|
str | None
|
Optional custom error message |
None
|
Source code in python/playfast/exceptions.py
RateLimitError
¶
Bases: PlayfastError
Raised when rate limit is exceeded.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
retry_after
|
int
|
Seconds to wait before retrying |
60
|
message
|
str | None
|
Optional custom error message |
None
|
Source code in python/playfast/exceptions.py
ParseError
¶
Bases: PlayfastError
Raised when HTML parsing fails.
This typically indicates that Google Play's page structure has changed or the response is not in the expected format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Description of what failed to parse |
required |
html_snippet
|
str | None
|
Optional snippet of the problematic HTML |
None
|
Source code in python/playfast/exceptions.py
NetworkError
¶
Bases: PlayfastError
Raised when network requests fail.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
The URL that failed |
required |
status_code
|
int | None
|
HTTP status code (if available) |
None
|
message
|
str | None
|
Optional custom error message |
None
|
Source code in python/playfast/exceptions.py
ValidationError
¶
Bases: PlayfastError
Raised when data validation fails.
This is different from Pydantic's ValidationError - it's for business logic validation that happens before or after Pydantic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field
|
str
|
The field that failed validation |
required |
value
|
object
|
The invalid value |
required |
message
|
str | None
|
Optional custom error message |
None
|
Source code in python/playfast/exceptions.py
TimeoutError
¶
Bases: PlayfastError
Raised when an operation times out.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
operation
|
str
|
Description of the operation that timed out |
required |
timeout
|
float
|
The timeout value in seconds |
required |
Source code in python/playfast/exceptions.py
options: show_source: true show_root_heading: true members: true