|
|
@@ -19,7 +19,7 @@ import {
|
|
|
WorkspaceRoutingQuery,
|
|
|
WorkspaceRoutingQueryFields,
|
|
|
} from "../middleware/workspace-routing"
|
|
|
-import { ApiNotFoundError } from "../errors"
|
|
|
+import { ApiNotFoundError, SessionBusyError } from "../errors"
|
|
|
import { described } from "./metadata"
|
|
|
import { QueryBoolean } from "./query"
|
|
|
|
|
|
@@ -354,7 +354,7 @@ export const SessionApi = HttpApi.make("session")
|
|
|
query: WorkspaceRoutingQuery,
|
|
|
payload: ShellPayload,
|
|
|
success: described(MessageV2.WithParts, "Created message"),
|
|
|
- error: [HttpApiError.BadRequest, ApiNotFoundError],
|
|
|
+ error: [HttpApiError.BadRequest, ApiNotFoundError, SessionBusyError],
|
|
|
}).annotateMerge(
|
|
|
OpenApi.annotations({
|
|
|
identifier: "session.shell",
|
|
|
@@ -367,7 +367,7 @@ export const SessionApi = HttpApi.make("session")
|
|
|
query: WorkspaceRoutingQuery,
|
|
|
payload: RevertPayload,
|
|
|
success: described(Session.Info, "Updated session"),
|
|
|
- error: [HttpApiError.BadRequest, ApiNotFoundError],
|
|
|
+ error: [HttpApiError.BadRequest, ApiNotFoundError, SessionBusyError],
|
|
|
}).annotateMerge(
|
|
|
OpenApi.annotations({
|
|
|
identifier: "session.revert",
|
|
|
@@ -380,7 +380,7 @@ export const SessionApi = HttpApi.make("session")
|
|
|
params: { sessionID: SessionID },
|
|
|
query: WorkspaceRoutingQuery,
|
|
|
success: described(Session.Info, "Updated session"),
|
|
|
- error: [HttpApiError.BadRequest, ApiNotFoundError],
|
|
|
+ error: [HttpApiError.BadRequest, ApiNotFoundError, SessionBusyError],
|
|
|
}).annotateMerge(
|
|
|
OpenApi.annotations({
|
|
|
identifier: "session.unrevert",
|
|
|
@@ -406,7 +406,7 @@ export const SessionApi = HttpApi.make("session")
|
|
|
params: { sessionID: SessionID, messageID: MessageID },
|
|
|
query: WorkspaceRoutingQuery,
|
|
|
success: described(Schema.Boolean, "Successfully deleted message"),
|
|
|
- error: [HttpApiError.BadRequest, ApiNotFoundError],
|
|
|
+ error: [HttpApiError.BadRequest, ApiNotFoundError, SessionBusyError],
|
|
|
}).annotateMerge(
|
|
|
OpenApi.annotations({
|
|
|
identifier: "session.deleteMessage",
|