fix(sdk): BUG-015 validate URL in capture() when using ScreenshotOptions
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 9m14s

- Add URL validation after options.to_dict() in Python SDK
- Add failing test first (TDD), then fix
- All 17 Python SDK tests passing
This commit is contained in:
OpenClaw 2026-02-27 11:01:11 +00:00
parent dfd410f842
commit 195a656a7d
5 changed files with 8 additions and 2 deletions

View file

@ -144,6 +144,8 @@ class SnapAPI:
"""
if options:
body = options.to_dict()
if not body.get('url'):
raise ValueError("url is required")
else:
if not url:
raise ValueError("url is required")