MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / handleResponseError

Function handleResponseError

out/cli.cjs:78914–78924  ·  view source on GitHub ↗
(e3, url2)

Source from the content-addressed store, hash-verified

78912 } catch (e3) {
78913 handleResponseError(e3, url2);
78914 }
78915 if (!response.ok) {
78916 await handleResponseNotOk(response, url2);
78917 }
78918 return response;
78919}
78920function handleResponseError(e3, url2) {
78921 let err = e3;
78922 if (err.name === "AbortError") {
78923 err = new GoogleGenerativeAIAbortError(`Request aborted when fetching ${url2.toString()}: ${e3.message}`);
78924 err.stack = e3.stack;
78925 } else if (!(e3 instanceof GoogleGenerativeAIFetchError || e3 instanceof GoogleGenerativeAIRequestInputError)) {
78926 err = new GoogleGenerativeAIError(`Error fetching from ${url2.toString()}: ${e3.message}`);
78927 err.stack = e3.stack;

Callers 1

makeRequestFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected