diff --git a/src/routes/postSkipSegments.ts b/src/routes/postSkipSegments.ts index 630fb70..637b1f0 100644 --- a/src/routes/postSkipSegments.ts +++ b/src/routes/postSkipSegments.ts @@ -75,7 +75,7 @@ async function sendWebhooks(apiVideoDetails: videoDetails, userID: string, video sendWebhookNotification(userID, videoID, UUID, userSubmissionCountRow.submissionCount, apiVideoDetails, { submissionStart: startTime, submissionEnd: endTime, - }, segmentInfo).catch(Logger.error); + }, segmentInfo).catch((e) => Logger.error(`sending webhooks: ${e}`)); // If it is a first time submission // Then send a notification to discord @@ -388,7 +388,7 @@ async function updateDataIfVideoDurationChange(videoID: VideoID, service: Servic await db.prepare("run", `UPDATE "sponsorTimes" SET "hidden" = 1 WHERE "UUID" = ?`, [submission.UUID]); } lockedCategoryList = []; - deleteLockCategories(videoID, null, null, service).catch(Logger.error); + deleteLockCategories(videoID, null, null, service).catch((e) => Logger.error(`deleting lock categories: ${e}`)); } return { @@ -612,7 +612,7 @@ export async function postSkipSegments(req: Request, res: Response): Promise Logger.error(`call send webhooks ${e}`)); } return res.json(newSegments); } diff --git a/src/routes/verifyToken.ts b/src/routes/verifyToken.ts index f696da0..a06acf0 100644 --- a/src/routes/verifyToken.ts +++ b/src/routes/verifyToken.ts @@ -32,7 +32,7 @@ export async function verifyTokenRequest(req: VerifyTokenRequest, res: Response) const identity = await getPatreonIdentity(tokens.accessToken); if (tokens.expiresIn < 15 * 24 * 60 * 60) { - refreshToken(TokenType.patreon, licenseKey, tokens.refreshToken).catch(Logger.error); + refreshToken(TokenType.patreon, licenseKey, tokens.refreshToken).catch((e) => Logger.error(`refresh token: ${e}`)); } /* istanbul ignore else */ diff --git a/src/routes/voteOnSponsorTime.ts b/src/routes/voteOnSponsorTime.ts index 186c8f9..5aa748b 100644 --- a/src/routes/voteOnSponsorTime.ts +++ b/src/routes/voteOnSponsorTime.ts @@ -96,7 +96,7 @@ async function checkVideoDuration(UUID: SegmentUUID) { AND "hidden" = 0 AND "shadowHidden" = 0 AND "actionType" != 'full' AND "votes" > -2`, [videoID, service, latestSubmission.timeSubmitted]); - deleteLockCategories(videoID, null, null, service).catch(Logger.error); + deleteLockCategories(videoID, null, null, service).catch((e) => Logger.error(`delete lock categories after vote: ${e}`)); } } @@ -411,7 +411,7 @@ export async function vote(ip: IPAddress, UUID: SegmentUUID, paramUserID: UserID // no restrictions on checkDuration // check duration of all submissions on this video if (type <= 0) { - checkVideoDuration(UUID).catch(Logger.error); + checkVideoDuration(UUID).catch((e) => Logger.error(`checkVideoDuration: ${e}`)); } try { @@ -524,7 +524,7 @@ export async function vote(ip: IPAddress, UUID: SegmentUUID, paramUserID: UserID incrementAmount, oldIncrementAmount, finalResponse - }).catch(Logger.error); + }).catch((e) => Logger.error(`Sending vote webhook: ${e}`)); } return { status: finalResponse.finalStatus, message: finalResponse.finalMessage ?? undefined }; } catch (err) {