Skip to content

Commit 855751f

Browse files
committed
mid air
1 parent 4ef19f8 commit 855751f

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/musicbrainz/web/musicbrainzrecordingstask.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,15 @@ void MusicBrainzRecordingsTask::doNetworkReplyFinished(
119119
// 200: Found
120120
// 301: Found, but UUID moved permanently in database
121121
// 404: Not found in database, i.e. empty result
122+
123+
// With tracks like "Kylie Minogue - I Should Be so Lucky"
124+
// with 48 recordings we experience a rate limits error.
125+
// Make it non fatal,
126+
// 503: Rate Limit exceeded
122127
if (statusCode != 200 &&
123128
statusCode != 301 &&
124-
statusCode != 404) {
129+
statusCode != 404 &&
130+
statusCode != 503) {
125131
kLogger.info()
126132
<< "GET reply"
127133
<< "statusCode:" << statusCode
@@ -141,6 +147,13 @@ void MusicBrainzRecordingsTask::doNetworkReplyFinished(
141147
return;
142148
}
143149

150+
if (statusCode == 503) {
151+
kLogger.info()
152+
<< "GET reply"
153+
<< "statusCode:" << statusCode
154+
<< "body:" << body;
155+
}
156+
144157
const auto [trackReleases, success] = musicbrainz::parseRecordings(reader);
145158
for (auto&& trackRelease : trackReleases) {
146159
// In case of a response with status 301 (Moved Permanently)

0 commit comments

Comments
 (0)