MCPcopy Index your code
hub / github.com/microsoft/TypeChat / isTransientHttpError

Function isTransientHttpError

typescript/src/model.ts:301–311  ·  view source on GitHub ↗

* Returns true of the given HTTP status code represents a transient error.

(code: number)

Source from the content-addressed store, hash-verified

299 * Returns true of the given HTTP status code represents a transient error.
300 */
301function isTransientHttpError(code: number): boolean {
302 switch (code) {
303 case 429: // TooManyRequests
304 case 500: // InternalServerError
305 case 502: // BadGateway
306 case 503: // ServiceUnavailable
307 case 504: // GatewayTimeout
308 return true;
309 }
310 return false;
311}
312
313/**
314 * Returns true when the given URL targets the OpenAI Responses API.

Callers 1

completeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected