MCPcopy Create free account
hub / github.com/pollinations/pollinations / parseApiError

Function parseApiError

apps/chat/src/utils/api.js:67–76  ·  view source on GitHub ↗
(response)

Source from the content-addressed store, hash-verified

65};
66
67const parseApiError = async (response) => {
68 // Drain the body so the connection isn't left open, but never reflect
69 // its contents back to the user.
70 try {
71 await response.text();
72 } catch {
73 /* ignore */
74 }
75 return buildClientError(response.status);
76};
77
78export const loadModels = async () => {
79 if (

Callers 4

sendMessageFunction · 0.70
generateImageFunction · 0.70
generateVideoFunction · 0.70
generateAudioFunction · 0.70

Calls 2

buildClientErrorFunction · 0.85
textMethod · 0.65

Tested by

no test coverage detected