mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-03 04:55:23 +02:00
fix: resolve OpenAPI 500 error caused by BigInt serialization in stopGracePeriodSwarm
Change Drizzle column mode from "bigint" to "number" for stopGracePeriodSwarm across all 6 service schemas. This fixes JSON.stringify failing silently in the @dokploy/trpc-openapi adapter, which unlike the tRPC endpoint does not use superjson and cannot serialize BigInt values. No database migration needed — only the JS representation changes. The values are nanosecond grace periods that fit safely within Number.MAX_SAFE_INTEGER. Also adds onError logging and export const config to the OpenAPI route handler to match the tRPC route and improve debuggability. Fixes #3793
This commit is contained in:
@@ -511,11 +511,6 @@ export const generateConfigContainer = (
|
||||
ulimitsSwarm,
|
||||
} = application;
|
||||
|
||||
const sanitizedStopGracePeriodSwarm =
|
||||
typeof stopGracePeriodSwarm === "bigint"
|
||||
? Number(stopGracePeriodSwarm)
|
||||
: stopGracePeriodSwarm;
|
||||
|
||||
const haveMounts = mounts && mounts.length > 0;
|
||||
|
||||
return {
|
||||
@@ -562,9 +557,9 @@ export const generateConfigContainer = (
|
||||
Order: "start-first",
|
||||
},
|
||||
}),
|
||||
...(sanitizedStopGracePeriodSwarm !== null &&
|
||||
sanitizedStopGracePeriodSwarm !== undefined && {
|
||||
StopGracePeriod: sanitizedStopGracePeriodSwarm,
|
||||
...(stopGracePeriodSwarm !== null &&
|
||||
stopGracePeriodSwarm !== undefined && {
|
||||
StopGracePeriod: stopGracePeriodSwarm,
|
||||
}),
|
||||
...(networkSwarm
|
||||
? {
|
||||
|
||||
Reference in New Issue
Block a user