MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / constructor

Method constructor

packages/baseai/src/dev/hono/errors.ts:118–136  ·  view source on GitHub ↗
({
		status,
		code,
		message,
		rateLimit,
		docs
	}: {
		status?: StatusCode;
		code: ErrorCodesType;
		message: string;
		rateLimit?: RateLimitErrorResponse;
		docs?: string;
	})

Source from the content-addressed store, hash-verified

116 public readonly docs?: string;
117
118 constructor({
119 status,
120 code,
121 message,
122 rateLimit,
123 docs
124 }: {
125 status?: StatusCode;
126 code: ErrorCodesType;
127 message: string;
128 rateLimit?: RateLimitErrorResponse;
129 docs?: string;
130 }) {
131 super(status || codeToStatus(code), { message });
132 this.code = code;
133 this.success = false;
134 this.rateLimit = rateLimit;
135 this.docs = docs;
136 }
137}
138
139export class ApiErrorZod extends HTTPException {

Callers

nothing calls this directly

Calls 1

codeToStatusFunction · 0.85

Tested by

no test coverage detected