MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / handleSignupPromotion

Function handleSignupPromotion

apps/web/src/lib/stytch.ts:230–264  ·  view source on GitHub ↗
(
  user: User,
  passedValidations: boolean,
  signupSource: SignupSource = null
)

Source from the content-addressed store, hash-verified

228 counts_as_selfservice: false,
229 });
230 } catch (error) {
231 captureException(error, {
232 tags: {
233 source: 'signup_promotion_credit_grant',
234 credit_category: 'openclaw-security-advisor-signup-bonus',
235 },
236 extra: { userId: user.id, email: user.google_user_email, signupSource },
237 });
238 }
239 }
240
241 if (signupSource?.kind === 'credit-campaign') {
242 const { grantCreditCampaignBonus } = await import('@/lib/credit-campaigns');
243 const result = await grantCreditCampaignBonus(user, signupSource.slug);
244 if (!result.granted && result.reason === 'error') {
245 // Internal error from the grant path already captured via Sentry
246 // inside grantCreditCampaignBonus. Eligibility-fail reasons
247 // (not-found, inactive, ended, capped) are expected business
248 // states, not errors — no extra reporting.
249 }
250 }
251}

Callers 2

stytch.test.tsFile · 0.90
AccountVerificationPageFunction · 0.90

Calls 2

grantCreditForCategoryFunction · 0.90
grantCreditCampaignBonusFunction · 0.85

Tested by

no test coverage detected