Skip to content

Commit 601e009

Browse files
committed
fix: return validation error instead of throwing to populate fetcher.data
1 parent 0be8aa8 commit 601e009

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/webapp/app/routes/admin.api.orgs.$orgId.feature-flags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
7474
} else {
7575
const validationResult = validatePartialFeatureFlags(body as Record<string, unknown>);
7676
if (!validationResult.success) {
77-
throw json(
77+
return json(
7878
{ error: "Invalid feature flags", details: validationResult.error.issues },
7979
{ status: 400 }
8080
);

0 commit comments

Comments
 (0)