mirror of
https://github.com/sct/overseerr.git
synced 2025-12-27 00:34:56 +01:00
fix(discover): display recent requests even if there is an error with *arr (#1141)
If Jellyseerr can't connect to Radarr/Sonarr, the "Recent Requests" slider will not load because of the error throwed when trying to get the Quality Profile. This PR catch this error so the recent requests are well displayed.
This commit is contained in:
@@ -159,7 +159,7 @@ requestRoutes.get<Record<string, unknown>, RequestResultsResponse>(
|
||||
|
||||
return {
|
||||
id: sonarrSetting.id,
|
||||
profiles: await sonarr.getProfiles(),
|
||||
profiles: await sonarr.getProfiles().catch(() => undefined),
|
||||
};
|
||||
})
|
||||
);
|
||||
@@ -174,7 +174,7 @@ requestRoutes.get<Record<string, unknown>, RequestResultsResponse>(
|
||||
|
||||
return {
|
||||
id: radarrSetting.id,
|
||||
profiles: await radarr.getProfiles(),
|
||||
profiles: await radarr.getProfiles().catch(() => undefined),
|
||||
};
|
||||
})
|
||||
);
|
||||
@@ -185,7 +185,7 @@ requestRoutes.get<Record<string, unknown>, RequestResultsResponse>(
|
||||
case MediaType.MOVIE: {
|
||||
const profileName = radarrServers
|
||||
.find((serverr) => serverr.id === r.serverId)
|
||||
?.profiles.find((profile) => profile.id === r.profileId)?.name;
|
||||
?.profiles?.find((profile) => profile.id === r.profileId)?.name;
|
||||
|
||||
return {
|
||||
...r,
|
||||
@@ -197,7 +197,7 @@ requestRoutes.get<Record<string, unknown>, RequestResultsResponse>(
|
||||
...r,
|
||||
profileName: sonarrServers
|
||||
.find((serverr) => serverr.id === r.serverId)
|
||||
?.profiles.find((profile) => profile.id === r.profileId)?.name,
|
||||
?.profiles?.find((profile) => profile.id === r.profileId)?.name,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user