Module error

Module error 

Source
Expand description

Error types for ReasonKit Web

This module provides a comprehensive error type hierarchy using thiserror for proper error handling across all components.

§Error Categories

§Example

use reasonkit_web::error::{WebError, Result};

fn process_request(data: &str) -> Result<String> {
    if data.is_empty() {
        return Err(WebError::invalid_request("Data cannot be empty").into());
    }
    Ok(data.to_uppercase())
}

Structs§

ErrorResponse
Structured JSON error response for serialization
RequestContext
Request context for error handling

Enums§

BrowserError
Browser lifecycle and control errors
CaptureError
Capture errors (screenshots, PDFs, etc.)
Error
The main error type for ReasonKit Web internal operations
ExtractionError
Content extraction errors
McpError
MCP protocol errors
NavigationError
Navigation errors
WebError
HTTP-level error with status codes and structured JSON responses.

Functions§

generate_request_id
Generate a unique request ID for tracing

Type Aliases§

Result
Result type alias for ReasonKit Web operations
WebResult
Result type alias for WebError operations