We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f976ab7 commit 36dc993Copy full SHA for 36dc993
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "@snapshot-labs/snapshot.js",
3
- "version": "0.11.14",
+ "version": "0.11.15",
4
"repository": "snapshot-labs/snapshot.js",
5
"license": "MIT",
6
"main": "dist/snapshot.cjs.js",
src/sign/index.ts
@@ -107,9 +107,11 @@ export default class Client {
107
fetch(address, init)
108
.then((res) => {
109
if (res.ok) return resolve(res.json());
110
+ if (res.headers.get('content-type')?.includes('application/json'))
111
+ return res.json().then(reject).catch(reject);
112
throw res;
113
})
- .catch((e) => reject(e));
114
+ .catch(reject);
115
});
116
}
117
0 commit comments