@aboutcircles/sdk 0.1.26 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4401,11 +4401,10 @@ class gQ {
4401
4401
  }
4402
4402
  async retrieve($) {
4403
4403
  let J = await fetch(`${this.getBaseUrl()}/retrieve?key=${encodeURIComponent($)}`);
4404
- if (!J.ok) {
4405
- let Q = await J.json();
4406
- throw Error(Q.error || `Failed to retrieve referral: ${J.statusText}`);
4407
- }
4408
- return J.json();
4404
+ if (J.status === 410 || J.ok)
4405
+ return J.json();
4406
+ let Q = await J.json().catch(() => null), Y = Q?.error || `Failed to retrieve referral: ${J.statusText}`, G = Error(Y);
4407
+ throw G.status = J.status, G.body = Q, G;
4409
4408
  }
4410
4409
  async listMine($) {
4411
4410
  if (!this.getToken)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aboutcircles/sdk",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "description": "Simplified Circles SDK for non-crypto users with low entrance barrier",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",