This exception is raised when the browser's response to a command indicates that an error occurred.
| 146 | |
| 147 | |
| 148 | class BrowserError(Exception): |
| 149 | """This exception is raised when the browser's response to a command indicates that an error occurred.""" |
| 150 | |
| 151 | def __init__(self, obj): |
| 152 | self.code = obj.get("code") |
| 153 | self.message = obj.get("message") |
| 154 | self.detail = obj.get("data") |
| 155 | |
| 156 | def __str__(self): |
| 157 | return f"BrowserError<code={self.code} message={self.message}> {self.detail}" |
| 158 | |
| 159 | |
| 160 | class CdpConnectionClosed(WsConnectionClosed): |
no outgoing calls
no test coverage detected