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

Function throw3dError

gen.pollinations.ai/src/model3d/handler.ts:126–142  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

124}
125
126export function throw3dError(error: unknown): never {
127 if (error instanceof UpstreamError) throw error;
128
129 if (error instanceof HttpError) {
130 throw new UpstreamError(remapUpstreamStatus(error.status), {
131 message: error.message,
132 upstreamStatus: error.status,
133 responseBody: JSON.stringify({ message: error.message }),
134 cause: error,
135 });
136 }
137 const message = error instanceof Error ? error.message : String(error);
138 throw new UpstreamError(500, {
139 message: message || "3D model generation failed",
140 cause: error,
141 });
142}

Callers 1

generate3dResponseFunction · 0.85

Calls 2

remapUpstreamStatusFunction · 0.90
stringifyMethod · 0.80

Tested by

no test coverage detected