Pin Minecraft 26.3 and add safe Orion managed deployment support
This commit is contained in:
1 parent
dff2b5a9c4
commit
008120dbad
40 files changed
+1877
-490
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { DockerError } from "./docker";
|
||||
import { RconError } from "./rcon";
|
||||
import { ManagedDeploymentError } from "./managed";
|
||||
|
||||
/**
|
||||
* Small helpers for route handlers. Authentication is enforced globally in
|
||||
@@ -21,6 +22,7 @@ export function handle(fn: () => Promise<NextResponse> | NextResponse) {
|
||||
try {
|
||||
return await fn();
|
||||
} catch (err) {
|
||||
if (err instanceof ManagedDeploymentError) return fail(err.message, 409);
|
||||
if (err instanceof DockerError && err.kind === "unavailable") {
|
||||
return fail("Docker is unreachable from the panel", 503);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user