Explorar o código

Added temporary fix for Song not found error

Kristian Vos %!s(int64=4) %!d(string=hai) anos
pai
achega
0bb06d5252
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  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) => {