PFR Errors¶
errors
¶
GriddyPFRError
dataclass
¶
Bases: SDKError
The base class for all PFR SDK HTTP error responses.
Source code in src/griddy/pfr/errors/griddypfrerror.py
ParsingError
¶
Bases: GriddyError
Raised when PFR HTML parsing fails to find expected elements.
Provides context about what was being parsed and where, making it easier to diagnose issues with changed page structures.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
The PFR URL that was fetched. |
|
selector |
The CSS selector or element identifier that was not found. |
|
html_sample |
A truncated sample of the HTML for debugging. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Description of the parsing failure. |
required |
url
|
Optional[str]
|
The PFR URL that was fetched. |
None
|
selector
|
Optional[str]
|
The CSS selector or element identifier that was not found. |
None
|
html_sample
|
Optional[str]
|
A truncated sample of the HTML for debugging. |
None
|
Source code in src/griddy/pfr/errors/parsing_error.py
GriddyPFRDefaultError
dataclass
¶
Bases: GriddyPFRError
The fallback error class if no more specific error class is matched.
Source code in src/griddy/pfr/errors/griddypfrdefaulterror.py
NoResponseError
dataclass
¶
Bases: GriddyError
Error raised when no HTTP response is received from the server.
Inherits from GriddyError so that catching GriddyError will also catch no-response errors.
Source code in src/griddy/core/errors/no_response_error.py
ResponseValidationError
dataclass
¶
Bases: GriddyPFRError
Error raised when there is a type mismatch between the response data and the expected Pydantic model.