(self)
| 343 | |
| 344 | @property |
| 345 | def flow(self) -> mitmproxy.flow.Flow: |
| 346 | flow_id = str(self.path_kwargs["flow_id"]) |
| 347 | # FIXME: Add a facility to addon.view to safely access the store |
| 348 | flow = self.view.get_by_id(flow_id) |
| 349 | if flow: |
| 350 | return flow |
| 351 | else: |
| 352 | raise APIError(404, "Flow not found.") |
| 353 | |
| 354 | def write_error(self, status_code: int, **kwargs): |
| 355 | if "exc_info" in kwargs and isinstance(kwargs["exc_info"][1], APIError): |