From 3c8e5e5958dae315523a5c28ee15482de8198acc Mon Sep 17 00:00:00 2001 From: Fabian <29468630+hfxbse@users.noreply.github.com> Date: Fri, 17 May 2024 15:31:43 +0200 Subject: [PATCH] Pass graph generation exceptions to stream controller (#8) --- src/instagram/follower.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/instagram/follower.ts b/src/instagram/follower.ts index 68c7508..5e6f95f 100644 --- a/src/instagram/follower.ts +++ b/src/instagram/follower.ts @@ -186,7 +186,11 @@ export function fetchFollowerGraph({root, session, limits, includeFollowing}: { return } - await createFollowerGraph({limits, graph, session, controller, includeFollowing}); + try { + await createFollowerGraph({limits, graph, session, controller, includeFollowing}); + } catch (e) { + controller.error(e) + } controller.close(); },