further crawl-errors improvements

This commit is contained in:
Gergő Móricz 2025-08-13 17:49:29 +02:00
parent 588fe390a3
commit 356b04fb65
4 changed files with 26 additions and 3 deletions

View File

@ -417,6 +417,7 @@ export interface CrawlErrorsResponse {
id: string,
timestamp?: string,
url: string,
code?: string,
error: string,
}[];

View File

@ -263,7 +263,13 @@ export interface TokenUsage {
}
export interface CrawlErrorsResponse {
errors: Array<Record<string, string>>;
errors: {
id: string;
timestamp?: string;
url: string;
code?: string;
error: string;
}[];
robotsBlocked: string[];
}

View File

@ -287,9 +287,17 @@ class V1CrawlStatusResponse(pydantic.BaseModel):
next: Optional[str] = None
data: List[V1FirecrawlDocument]
class V1CrawlError(pydantic.BaseModel):
"""A crawl error."""
id: str
timestamp: Optional[datetime] = None
url: str
code: Optional[str] = None
error: str
class V1CrawlErrorsResponse(pydantic.BaseModel):
"""Response from crawl/batch scrape error monitoring."""
errors: List[Dict[str, str]] # {id: str, timestamp: str, url: str, error: str}
errors: List[V1CrawlError]
robotsBlocked: List[str]
class V1MapParams(pydantic.BaseModel):

View File

@ -502,9 +502,17 @@ class JobStatus(BaseModel):
completed_at: Optional[datetime] = None
expires_at: Optional[datetime] = None
class CrawlError(BaseModel):
"""A crawl error."""
id: str
timestamp: Optional[datetime] = None
url: str
code: Optional[str] = None
error: str
class CrawlErrorsResponse(BaseModel):
"""Response from crawl error monitoring."""
errors: List[Dict[str, str]]
errors: List[CrawlError]
robots_blocked: List[str]
class ActiveCrawl(BaseModel):