Skip to content

ref(aws-serverless): Use debug instead of logger #17030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2025

Conversation

AbhiPrasad
Copy link
Member

resolves #16953

@AbhiPrasad AbhiPrasad requested a review from a team July 15, 2025 19:57
@AbhiPrasad AbhiPrasad self-assigned this Jul 15, 2025
@AbhiPrasad AbhiPrasad requested review from Lms24 and msonnb and removed request for a team July 15, 2025 19:57
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Incorrect Debug Method Usage Causes Errors

logger.error calls were replaced with debug.error, but the debug export from @sentry/core is a function, not an object with an .error method. When DEBUG_BUILD is true, this throws TypeError: debug.error is not a function, breaking the Lambda wrapper, specifically error handling in tryPatchHandler and the flush-error handler. All similar replacements in the file are affected.

packages/aws-serverless/src/sdk.ts#L126-L134

const handlerDesc = basename(handlerPath);
const match = handlerDesc.match(/^([^.]*)\.(.*)$/);
if (!match) {
DEBUG_BUILD && debug.error(`Bad handler ${handlerDesc}`);
return;
}
const [, handlerMod = '', handlerName = ''] = match;

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@andreiborza andreiborza merged commit 78b8e4b into develop Jul 16, 2025
41 checks passed
@andreiborza andreiborza deleted the abhi-debug-aws-serverless branch July 16, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate aws-serverless package to use debug
3 participants