diff --git a/src/controllers/auth/anilist/index.ts b/src/controllers/auth/anilist/index.ts index ea11271..70b5018 100644 --- a/src/controllers/auth/anilist/index.ts +++ b/src/controllers/auth/anilist/index.ts @@ -212,7 +212,8 @@ app.openapi(route, async (c) => { async (err, stream) => { console.error("Error occurred in SSE"); console.error(err); - stream.writeln("An error occurred"); + await stream.writeln("An error occurred"); + await stream.close(); }, ); });