MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / createHttpError

Function createHttpError

sdk/src/error-utils.ts:25–29  ·  view source on GitHub ↗
(message: string, statusCode: number)

Source from the content-addressed store, hash-verified

23 * Creates an Error with a statusCode property
24 */
25export function createHttpError(message: string, statusCode: number): HttpError {
26 const error = new Error(message) as HttpError
27 error.statusCode = statusCode
28 return error
29}
30
31/**
32 * Creates an authentication error (401)

Callers 7

getUserInfoFromApiKeyFunction · 0.90
createAuthErrorFunction · 0.85
createForbiddenErrorFunction · 0.85
createServerErrorFunction · 0.85
createNetworkErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected