mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-30 21:01:54 +08:00
fix(config): add UUID validation to run_id in cancel/commit/run route schemas
Adds .uuid() to the yupString() validator for run_id in all three config agent routes (cancel, commit, run). Without this, a non-UUID string reaches lockConfigAgentRun's ::uuid SQL cast and causes a PostgreSQL 'invalid input syntax for type uuid' exception — surfacing as a 500 instead of a clean 400. Co-Authored-By: mantra <mantra@stack-auth.com>
This commit is contained in:
parent
8837389870
commit
8c24f791c1
@ -30,7 +30,7 @@ export const POST = createSmartRouteHandler({
|
||||
tenancy: adaptSchema,
|
||||
}).defined(),
|
||||
body: yupObject({
|
||||
run_id: yupString().defined(),
|
||||
run_id: yupString().uuid().defined(),
|
||||
}).defined(),
|
||||
method: yupString().oneOf(["POST"]).defined(),
|
||||
}),
|
||||
|
||||
@ -33,7 +33,7 @@ export const POST = createSmartRouteHandler({
|
||||
tenancy: adaptSchema,
|
||||
}).defined(),
|
||||
body: yupObject({
|
||||
run_id: yupString().defined(),
|
||||
run_id: yupString().uuid().defined(),
|
||||
github_access_token: yupString().defined(),
|
||||
commit_message: yupString().optional(),
|
||||
}).defined(),
|
||||
|
||||
@ -21,7 +21,7 @@ export const GET = createSmartRouteHandler({
|
||||
tenancy: adaptSchema,
|
||||
}).defined(),
|
||||
query: yupObject({
|
||||
run_id: yupString().defined(),
|
||||
run_id: yupString().uuid().defined(),
|
||||
}).defined(),
|
||||
}),
|
||||
response: yupObject({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user