Skip to content

Commit

Permalink
fix: log and not trigger sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
mansaj committed Dec 12, 2024
1 parent 2c6d1f6 commit ff86f9f
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.error("scan_created_error", {
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 ff86f9f

Please sign in to comment.