UNPKG

@gensx/storage

Version:

Cloud storage, blobs, sqlite, and vector database providers/hooks for GenSX.

23 lines (20 loc) 623 B
/** * Check out the docs at https://www.gensx.com/docs * Find us on Github https://github.com/gensx-inc/gensx * Find us on Discord https://discord.gg/F5BSU8Kc */ async function parseErrorResponse(response) { try { const clonedResponse = response.clone(); const data = (await clonedResponse.json()); if (typeof data.error === "string" && data.error.trim()) { return data.error; } } catch { // Ignore JSON parse errors } return response.statusText || `HTTP ${response.status}`; } export { parseErrorResponse }; //# sourceMappingURL=parse-error.js.map