bito-code-review[bot] commented on PR #42273:
URL: https://github.com/apache/superset/pull/42273#issuecomment-5146032961

   <!-- Bito Reply -->
   The flagged issue is valid. The current implementation in 
`superset/utils/webdriver.py` forces a `PlaywrightTimeout` exception when 
`take_tiled_screenshot` returns `None` (or empty bytes), which conflates 
various failure modes (e.g., element lookup, JS errors) with a simple timeout. 
To resolve this, you should define a specific exception for tiled-capture 
failures and raise that instead of `PlaywrightTimeout` to preserve the original 
error context.
   
   Here is a concise implementation to replace the generic timeout:
   
   ```python
   # Define a specific exception for tiled capture failures
   class TiledCaptureError(Exception):
       pass
   
   # In superset/utils/webdriver.py, replace the raise statement:
   if not img:
       logger.warning("Tiled screenshot failed for url %s", url)
       raise TiledCaptureError(f"Tiled screenshot failed for url {url}")
   ```
   
   I have checked the PR comments and there are no other pending review 
comments to address. Would you like me to assist with any other part of this PR?
   
   **superset/utils/webdriver.py**
   ```
   if not img:
       logger.warning("Tiled screenshot failed for url %s", url)
       raise TiledCaptureError(f"Tiled screenshot failed for url {url}")
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to