fix(httpapi): return pty error bodies (#28838)

This commit is contained in:
Shoubhit Dash
2026-05-22 21:00:20 +05:30
committed by GitHub
parent d92b8d8009
commit 5cf597d583
7 changed files with 119 additions and 14 deletions
@@ -149,6 +149,23 @@ export class McpServerNotFoundError extends Schema.TaggedErrorClass<McpServerNot
{ httpApiStatus: 404 },
) {}
export class PtyNotFoundError extends Schema.TaggedErrorClass<PtyNotFoundError>()(
"PtyNotFoundError",
{
ptyID: Schema.String,
message: Schema.String,
},
{ httpApiStatus: 404 },
) {}
export class PtyForbiddenError extends Schema.TaggedErrorClass<PtyForbiddenError>()(
"PtyForbiddenError",
{
message: Schema.String,
},
{ httpApiStatus: 403 },
) {}
export class ApiNotFoundError extends Schema.ErrorClass<ApiNotFoundError>("NotFoundError")(
{
name: Schema.Literal("NotFoundError"),