@@ -124,7 +124,7 @@ const moduleFormatOnboarding: Record<ModuleFormat, OnboardingConfig<PlatformOpti
124
124
...params ,
125
125
} ) ,
126
126
] ,
127
- verify : ( ) => [
127
+ verify : ( params : Params ) => [
128
128
{
129
129
type : StepType . VERIFY ,
130
130
description : t (
@@ -133,7 +133,16 @@ const moduleFormatOnboarding: Record<ModuleFormat, OnboardingConfig<PlatformOpti
133
133
configurations : [
134
134
{
135
135
language : 'javascript' ,
136
- code : `throw new Error("This should show up in Sentry!");` ,
136
+ code : `${
137
+ params . isLogsSelected
138
+ ? `
139
+ // Send a log before throwing the error
140
+ Sentry.logger.info('User triggered test error', {
141
+ action: 'test_error_lambda',
142
+ });`
143
+ : ''
144
+ }
145
+ throw new Error("This should show up in Sentry!");` ,
137
146
} ,
138
147
] ,
139
148
} ,
@@ -176,7 +185,7 @@ const moduleFormatOnboarding: Record<ModuleFormat, OnboardingConfig<PlatformOpti
176
185
] ,
177
186
} ,
178
187
] ,
179
- verify : ( ) => [
188
+ verify : ( params : Params ) => [
180
189
{
181
190
type : StepType . VERIFY ,
182
191
description : t (
@@ -186,7 +195,15 @@ const moduleFormatOnboarding: Record<ModuleFormat, OnboardingConfig<PlatformOpti
186
195
{
187
196
language : 'javascript' ,
188
197
code : `
189
- export const handler = Sentry.wrapHandler(async (event, context) => {
198
+ export const handler = Sentry.wrapHandler(async (event, context) => {${
199
+ params . isLogsSelected
200
+ ? `
201
+ // Send a log before throwing the error
202
+ Sentry.logger.info('User triggered test error', {
203
+ action: 'test_error_lambda',
204
+ });`
205
+ : ''
206
+ }
190
207
throw new Error("This should show up in Sentry!")
191
208
});` ,
192
209
} ,
0 commit comments