Skip to content

Commit 691b052

Browse files
committed
fix: Improve error message for missing song ID in GetById method
1 parent a8a5f5f commit 691b052

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Prober/DivingFish/Models/Song.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private static Songs SharedSongs
6565

6666
public static Song GetById(string id) => SharedSongs._songsById.TryGetValue(id, out Song? song)
6767
? song
68-
: throw new InvalidDataException();
68+
: throw new InvalidDataException($"Song with ID {id} not found");
6969

7070
public static explicit operator Songs(List<Song> songs) => new(songs);
7171

src/Prober/Lxns/Models/Record.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public record Record : SimpleRecord
4545
SongData songData = SongData.Shared;
4646
if (!songData.SongsById.TryGetValue(Id, out Song? song))
4747
{
48-
throw new InvalidDataException();
48+
throw new InvalidDataException($"Song with ID {Id} not found");
4949
}
5050

5151
return (Type switch

0 commit comments

Comments
 (0)