diff --git a/src/app/api/v1/user/welcome-scan/create/route.ts b/src/app/api/v1/user/welcome-scan/create/route.ts index 23ddf66d2bc..7f913226f6f 100644 --- a/src/app/api/v1/user/welcome-scan/create/route.ts +++ b/src/app/api/v1/user/welcome-scan/create/route.ts @@ -57,7 +57,10 @@ export async function POST( getCountryCode(headers()), ); if (!eligible) { - throw new Error("User is not eligible for feature"); + logger.error("scan_created_error", { + message: "User is not eligible for feature", + }); + return NextResponse.json({ success: false }, { status: 422 }); } const params: UserInfo = await req.json();