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

Function handleResponseNotOk

out/cli.cjs:78925–78938  ·  view source on GitHub ↗
(response, url2)

Source from the content-addressed store, hash-verified

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;
78928 }
78929 throw err;
78930}
78931async function handleResponseNotOk(response, url2) {
78932 let message = "";
78933 let errorDetails;
78934 try {
78935 const json = await response.json();
78936 message = json.error.message;
78937 if (json.error.details) {
78938 message += ` ${JSON.stringify(json.error.details)}`;
78939 errorDetails = json.error.details;
78940 }
78941 } catch (e3) {

Callers 1

makeRequestFunction · 0.85

Calls 2

jsonMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected