Skip to content

Commit

Permalink
Merge pull request #5406 from mozilla/MNTOR-3656
Browse files Browse the repository at this point in the history
MNTOR-3656: log not throw "User is not eligible for feature"
  • Loading branch information
mansaj authored Dec 13, 2024
2 parents 5505841 + 1d870c7 commit 936a683
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/api/v1/user/welcome-scan/create/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export async function POST(
getCountryCode(headers()),
);
if (!eligible) {
throw new Error("User is not eligible for feature");
logger.warn("scan_created_warn", {
message: "User is not eligible for feature",
});
return NextResponse.json({ success: false }, { status: 422 });
}

const params: UserInfo = await req.json();
Expand Down

0 comments on commit 936a683

Please sign in to comment.