stopPropagation(); $content = json_encode([ "status" => 'error', "code" => $throwable->getCode(), "result" => [], "message" => $throwable->getMessage() ]); return $response->withHeader('Content-Type', 'application/json')->withBody(new SwooleStream($content)); } public function isValid(Throwable $throwable): bool { return $throwable instanceof SsdbException; } }