Selaa lähdekoodia

Added temporary fix for Song not found error

Kristian Vos 4 vuotta sitten
vanhempi
commit
0bb06d5252
1 muutettua tiedostoa jossa 9 lisäystä ja 1 poistoa
  1. 9 1
      backend/logic/stations.js

+ 9 - 1
backend/logic/stations.js

@@ -600,7 +600,15 @@ class _StationsModule extends CoreClass {
 										next(null, song);
 									}
 								})
-								.catch(next);
+								.catch(err => {
+									if (err.message === "Song not found.") {
+										this.log(
+											"ERROR",
+											`In GET_NEXT_STATION_SONG, attempted to get song "${song._id}", but got the error "Song not found.". Ignoring it for now, but this is not normal.`
+										);
+										next(null, song);
+									} else next(err);
+								});
 					}
 				],
 				(err, song) => {