Skip to content

Commit d29de56

Browse files
authored
chore(aws-serverless): Fix typo in timeout warning function name (#18031)
While exploring the Timeout Warning feature in `Sentry.wrapHandler`, I fount a type in the function name. It seems `setupTimeoutWarning` was intended name, so I've corrected it accordingly. ## Changes - Renamed `setupTimeoutWatning` → `setupTimeoutWarning` - Updated all 3 call sites to use the corrected function name ## Checklist - [x] Code lints successfully (`yarn lint`) - [x] No new tests required (typo fix only, no functional changes)
1 parent 229a498 commit d29de56

File tree

1 file changed

+3
-3
lines changed
  • packages/aws-serverless/src

1 file changed

+3
-3
lines changed

packages/aws-serverless/src/sdk.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function enhanceScopeWithEnvironmentData(scope: Scope, context: Context, startTi
108108
});
109109
}
110110

111-
function setupTimeoutWatning(context: Context, options: WrapperOptions): NodeJS.Timeout | undefined {
111+
function setupTimeoutWarning(context: Context, options: WrapperOptions): NodeJS.Timeout | undefined {
112112
// In seconds. You cannot go any more granular than this in AWS Lambda.
113113
const configuredTimeout = Math.ceil(tryGetRemainingTimeInMillis(context) / 1000);
114114
const configuredTimeoutMinutes = Math.floor(configuredTimeout / 60);
@@ -220,7 +220,7 @@ export function wrapHandler<TEvent, TResult>(
220220
return async (event: TEvent, context: Context) => {
221221
context.callbackWaitsForEmptyEventLoop = options.callbackWaitsForEmptyEventLoop;
222222

223-
timeoutWarningTimer = setupTimeoutWatning(context, options);
223+
timeoutWarningTimer = setupTimeoutWarning(context, options);
224224

225225
async function processResult(): Promise<TResult> {
226226
const scope = getCurrentScope();
@@ -272,7 +272,7 @@ function wrapStreamingHandler<TEvent, TResult>(
272272
): Promise<TResult> => {
273273
context.callbackWaitsForEmptyEventLoop = options.callbackWaitsForEmptyEventLoop;
274274

275-
timeoutWarningTimer = setupTimeoutWatning(context, options);
275+
timeoutWarningTimer = setupTimeoutWarning(context, options);
276276

277277
async function processStreamingResult(): Promise<TResult> {
278278
const scope = getCurrentScope();

0 commit comments

Comments
 (0)