Add UnavailableError and keep the PermissionError name

Host not connected, host shutting down and instance not running are
now UnavailableError (503) instead of ConflictError. The request error
migration notes move to a new 2.1 guide, since this ships in 2.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-10-27 22:03:13 +00:00
1 parent 1c7c00b033
commit 54e9340e61
23 files changed
+78 -66

No files matched your search

+2 -2
View File
@@ -173,7 +173,7 @@ export default class InstanceManager {
* the instance will be unassigned.
*
* @throws {module:lib.NotFoundError} if the instance does not exist.
* @throws {module:lib.ConflictError} if the target host is not connected.
* @throws {module:lib.UnavailableError} if the target host is not connected.
*/
async assignInstance(
instanceId: number,
@@ -191,7 +191,7 @@ export default class InstanceManager {
if (hostId !== null) {
newHostConnection = hostConnections.get(hostId);
if (!newHostConnection) {
throw new lib.ConflictError("Target host is not connected to the controller");
throw new lib.UnavailableError("Target host is not connected to the controller");
}
}