Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/aws-serverless/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function enhanceScopeWithEnvironmentData(scope: Scope, context: Context, startTi
});
}

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

timeoutWarningTimer = setupTimeoutWatning(context, options);
timeoutWarningTimer = setupTimeoutWarning(context, options);

async function processResult(): Promise<TResult> {
const scope = getCurrentScope();
Expand Down Expand Up @@ -272,7 +272,7 @@ function wrapStreamingHandler<TEvent, TResult>(
): Promise<TResult> => {
context.callbackWaitsForEmptyEventLoop = options.callbackWaitsForEmptyEventLoop;

timeoutWarningTimer = setupTimeoutWatning(context, options);
timeoutWarningTimer = setupTimeoutWarning(context, options);

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