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