Mute unenecessary feature warning error

This commit is contained in:
Konstantin Wohlwend 2026-01-19 11:51:53 -08:00
parent 1ba0ff38d2
commit 2b10fde743

View File

@ -22,7 +22,11 @@ export const POST = createSmartRouteHandler({
body: yupString().defined(),
}),
handler: async (req) => {
captureError("check-feature-support", new StackAssertionError(`${req.auth?.user?.primaryEmail || "User"} tried to check support of unsupported feature: ${JSON.stringify(req.body, null, 2)}`, { req }));
const featureName = req.body?.feature_name;
const expectedUnsupportedFeatures = ["rsc-handler-signIn"];
if (!expectedUnsupportedFeatures.includes(featureName)) {
captureError("check-feature-support", new StackAssertionError(`${req.auth?.user?.primaryEmail || "User"} tried to check support of unsupported feature: ${JSON.stringify(req.body, null, 2)}`, { req }));
}
return {
statusCode: 200,
bodyType: "text",