( user: User, passedValidations: boolean, signupSource: SignupSource = null )
| 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 | } |
no test coverage detected