Some more unit tests, add access token errors to scrobble errors table to stop try-loop
This commit is contained in:
parent
7bca05269f
commit
6642f96d8f
2 changed files with 32 additions and 3 deletions
|
|
@ -1065,6 +1065,15 @@ public class ScrobblingService : IScrobblingService
|
|||
_logger.LogCritical(ex, "Access Token for AppUserId: {AppUserId} needs to be regenerated/renewed to continue scrobbling", evt.AppUser.Id);
|
||||
evt.SetErrorMessage(AccessTokenErrorMessage);
|
||||
_unitOfWork.ScrobbleRepository.Update(evt);
|
||||
|
||||
// Ensure series with this error do not get re-processed next sync
|
||||
_unitOfWork.ScrobbleRepository.Attach(new ScrobbleError
|
||||
{
|
||||
Comment = AccessTokenErrorMessage,
|
||||
Details = $"{evt.AppUser.UserName} has an invalid access token (K+ Error)",
|
||||
LibraryId = evt.LibraryId,
|
||||
SeriesId = evt.SeriesId,
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue