diff --git a/packages/raga-app/src/server/handlers/convertToMP3Handler.ts b/packages/raga-app/src/server/handlers/convertToMP3Handler.ts index c0d7e3f7..12e6489b 100644 --- a/packages/raga-app/src/server/handlers/convertToMP3Handler.ts +++ b/packages/raga-app/src/server/handlers/convertToMP3Handler.ts @@ -15,11 +15,11 @@ export function getConvertToMP3RequestHandler(converter: AudioFileConverter): Ha return async ( req: RequestWithBody, res: Response, - next: NextFunction, + next: NextFunction | undefined, ) => { await json()(req, res, (err) => { if (err) { - next(err); + next?.(err); return; } });