Skip to content

Commit b7aa96c

Browse files
committed
fix return code
1 parent c0b7ec0 commit b7aa96c

File tree

1 file changed

+1
-9
lines changed
  • apps/sim/app/api/guardrails/validate

1 file changed

+1
-9
lines changed

apps/sim/app/api/guardrails/validate/route.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,7 @@ export async function POST(request: NextRequest) {
1616
try {
1717
const auth = await checkSessionOrInternalAuth(request, { requireWorkflowId: false })
1818
if (!auth.success || !auth.userId) {
19-
return NextResponse.json({
20-
success: true,
21-
output: {
22-
passed: false,
23-
validationType: 'unknown',
24-
input: '',
25-
error: 'Unauthorized',
26-
},
27-
})
19+
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
2820
}
2921

3022
const body = await request.json()

0 commit comments

Comments
 (0)