mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-02 20:30:10 +00:00
Count errors and skip shelf on token decrypt fail
When decrypting a user's API token fails, increment stats.errors and continue to the next shelf instead of proceeding. This ensures failed decryptions are tracked in metrics and prevents attempting to fetch data with an invalid token.
This commit is contained in:
@@ -70,6 +70,8 @@ export async function processHardcoverShelves(
|
||||
}
|
||||
} catch (err) {
|
||||
log.error(`Failed to decrypt API token for user ${shelf.user.plexUsername}`);
|
||||
stats.errors++;
|
||||
continue;
|
||||
}
|
||||
|
||||
let fetchedData: { listName: string; books: HardcoverApiBook[] };
|
||||
|
||||
Reference in New Issue
Block a user