@supabase/postgrest-js
Advanced tools
Comparing version 0.35.0 to 0.35.1
@@ -78,3 +78,11 @@ "use strict"; | ||
else { | ||
error = yield res.json(); | ||
const body = yield res.text(); | ||
try { | ||
error = JSON.parse(body); | ||
} | ||
catch (_d) { | ||
error = { | ||
message: body, | ||
}; | ||
} | ||
if (error && this.shouldThrowOnError) { | ||
@@ -81,0 +89,0 @@ throw error; |
@@ -1,2 +0,2 @@ | ||
export declare const version = "0.35.0"; | ||
export declare const version = "0.35.1"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
// generated by genversion | ||
exports.version = '0.35.0'; | ||
exports.version = '0.35.1'; | ||
//# sourceMappingURL=version.js.map |
@@ -72,3 +72,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
else { | ||
error = yield res.json(); | ||
const body = yield res.text(); | ||
try { | ||
error = JSON.parse(body); | ||
} | ||
catch (_d) { | ||
error = { | ||
message: body, | ||
}; | ||
} | ||
if (error && this.shouldThrowOnError) { | ||
@@ -75,0 +83,0 @@ throw error; |
@@ -1,2 +0,2 @@ | ||
export declare const version = "0.35.0"; | ||
export declare const version = "0.35.1"; | ||
//# sourceMappingURL=version.d.ts.map |
// generated by genversion | ||
export const version = '0.35.0'; | ||
export const version = '0.35.1'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@supabase/postgrest-js", | ||
"version": "0.35.0", | ||
"version": "0.35.1", | ||
"description": "Isomorphic PostgREST client", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -41,3 +41,5 @@ # `postgrest-js` | ||
const REST_URL = 'http://localhost:3000' | ||
const postgrest = new PostgrestClient(REST_URL, { fetch: fetch }) | ||
const postgrest = new PostgrestClient(REST_URL, { | ||
fetch: (...args) => fetch(...args), | ||
}) | ||
``` | ||
@@ -44,0 +46,0 @@ |
@@ -127,4 +127,12 @@ import crossFetch from 'cross-fetch' | ||
} else { | ||
error = await res.json() | ||
const body = await res.text() | ||
try { | ||
error = JSON.parse(body) | ||
} catch { | ||
error = { | ||
message: body, | ||
} | ||
} | ||
if (error && this.shouldThrowOnError) { | ||
@@ -131,0 +139,0 @@ throw error |
// generated by genversion | ||
export const version = '0.35.0' | ||
export const version = '0.35.1' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
209511
3871
55