@snapshot-labs/snapshot.js 0.6.0 → 0.6.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapshot-labs/snapshot.js",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "repository": "snapshot-labs/snapshot.js",
5
5
  "license": "MIT",
6
6
  "main": "dist/snapshot.cjs.js",
package/src/utils.ts CHANGED
@@ -150,14 +150,16 @@ export async function subgraphRequest(url: string, query, options: any = {}) {
150
150
  responseData = JSON.parse(responseData);
151
151
  } catch (e) {
152
152
  throw new Error(
153
- `Errors found in subgraphRequest: URL: ${url}, Status: ${res.status}, Response: ${responseData}`
153
+ `Errors found in subgraphRequest: URL: ${url}, Status: ${
154
+ res.status
155
+ }, Response: ${responseData.substring(0, 400)}`
154
156
  );
155
157
  }
156
158
  if (responseData.errors) {
157
159
  throw new Error(
158
160
  `Errors found in subgraphRequest: URL: ${url}, Status: ${
159
161
  res.status
160
- }, Response: ${JSON.stringify(responseData.errors)}`
162
+ }, Response: ${JSON.stringify(responseData.errors).substring(0, 400)}`
161
163
  );
162
164
  }
163
165
  const { data } = responseData;