fix: properly serialize Pydantic HttpUrl in webhook config
Use model_dump(mode='json') instead of deprecated dict() method to ensure Pydantic special types (HttpUrl, UUID, etc.) are properly serialized to JSON-compatible native Python types. This fixes webhook delivery failures caused by HttpUrl objects remaining as Pydantic types in the webhook_config dict, which caused JSON serialization errors and httpx request failures. Also update mcp requirement to >=1.18.0 for compatibility.
This commit is contained in:
@@ -86,7 +86,7 @@ async def crawl_job_enqueue(
|
||||
):
|
||||
webhook_config = None
|
||||
if payload.webhook_config:
|
||||
webhook_config = payload.webhook_config.dict()
|
||||
webhook_config = payload.webhook_config.model_dump(mode='json')
|
||||
|
||||
return await handle_crawl_job(
|
||||
_redis,
|
||||
|
||||
Reference in New Issue
Block a user