@7-docs/edge
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -14,4 +14,5 @@ import { getControllerUrl } from '../util.js'; | ||
const text = await response.text(); | ||
throw new Error(text ?? `Unable to create new index (${response.status} ${response.statusText})`); | ||
const message = `${response.status} ${response.statusText}: ${text ?? `Unable to create new index`})`; | ||
throw new Error(message); | ||
} | ||
}; |
@@ -11,3 +11,8 @@ import { getControllerUrl } from '../util.js'; | ||
}); | ||
if (!response.ok) { | ||
const text = await response.text(); | ||
const message = `${response.status} ${response.statusText}: ${text ?? `Unable to list indexes`})`; | ||
throw new Error(message); | ||
} | ||
return response.json(); | ||
}; |
@@ -13,5 +13,6 @@ import { ensureProtocol } from '../util.js'; | ||
if (!response.ok) { | ||
const error = await response.json(); | ||
throw new Error(error.message ?? `Unable to delete (${response.status} ${response.statusText})`); | ||
const text = await response.text(); | ||
const message = `${response.status} ${response.statusText}: ${text ?? `Unable to delete vectors`})`; | ||
throw new Error(message); | ||
} | ||
}; |
@@ -12,3 +12,8 @@ import { ensureProtocol } from '../util.js'; | ||
}); | ||
if (!response.ok) { | ||
const text = await response.text(); | ||
const message = `${response.status} ${response.statusText}: ${text ?? `Unable to upsert vectors`})`; | ||
throw new Error(message); | ||
} | ||
return response.json(); | ||
}; |
{ | ||
"name": "@7-docs/edge", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Dependency-free package for 7-docs to query your content from anywhere JavaScript can run", | ||
@@ -38,3 +38,3 @@ "homepage": "https://github.com/7-docs/7-docs", | ||
"dependencies": { | ||
"@7-docs/shared": "0.1.4" | ||
"@7-docs/shared": "0.1.5" | ||
}, | ||
@@ -41,0 +41,0 @@ "devDependencies": { |
22585
507
+ Added@7-docs/shared@0.1.5(transitive)
- Removed@7-docs/shared@0.1.4(transitive)
Updated@7-docs/shared@0.1.5