Skip to content

v3.0.0

Latest

Choose a tag to compare

@monteslu monteslu released this 04 Feb 21:31

Breaking Changes

  • 202 responses now return a special object instead of being treated as errors

When BGG queues a collection request (HTTP 202), the library now returns:

{
  _queued: true,
  _status: 202,
  _message: "Request queued by BGG. Retry after a short delay."
}

You can detect this and retry:

const result = await bgg("collection", { username: "someone" });
if (result._queued) {
  await new Promise(r => setTimeout(r, 2000));
  return bgg("collection", { username: "someone" });
}

This closes a 10-year-old issue (#2)!

Full Changelog: v2.0.0...v3.0.0