diff --git a/api/src/discogs.ts b/api/src/discogs.ts index 6126506..0972bb8 100644 --- a/api/src/discogs.ts +++ b/api/src/discogs.ts @@ -111,7 +111,21 @@ export default function createDiscogs(log: Log, pg: Pg) { if (unlisted) log.info({ unlisted: unlisted, ...wantDetails(want) }, 'missing listings removed'); // preferentially take listings from sellers if we hit req limits - return Bluebird.mapSeries(ids, async id => listing(id, want)); + + // sometimes we get dodgy listings from discogs that throw perm errors + // we just want to ignore them + const results = await Promise.allSettled(ids.map(id => listing(id, want))); + // @ts-ignore + const validListings = results + .map(r => { + if (r.status === 'fulfilled') return r.value; + if (r.reason.message.includes('rate limited')) throw r.reason; + return null + }) + .filter(v => v); + + return validListings; + } async function listing(id, want) { diff --git a/client/src/routes/info.tsx b/client/src/routes/info.tsx index 65efca6..e90d4ad 100644 --- a/client/src/routes/info.tsx +++ b/client/src/routes/info.tsx @@ -18,6 +18,7 @@ const Info = () => {
First, add some records to your List on the Search Page.
Mates Crates will then make Offers to you for releases you add to your List.
+(this can take a few minutes time!)
Select all Offers you are interested in, the more you accept the more likely the item will be Confirmed.
Check back regularly for updated Offers, the global record marketplace is a living thing.