Skip to main content

Error Enum

Law4DevsError implements std::error::Error and Display via thiserror.

Matching Errors


With ? Propagation


Retry Behavior

The SDK automatically retries 429 and 5xx responses with exponential backoff:
AttemptDelay
1st retry1 second
2nd retry2 seconds
3rd retry4 seconds
404 and 400 are thrown immediately without retrying.

Safe Get Pattern


Streams and Errors

Each item in an iter() stream is a Result<T, Law4DevsError>. A single failed page stops the stream: