Skip to content

fix: improve logging when there is an error retrieving ssm parameters #3962

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 2, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion lambdas/functions/control-plane/src/aws/runners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ async function getAmiIdOverride(runnerParameters: Runners.RunnerInputParameters)
'Please ensure that the given parameter exists on this region and contains a valid runner AMI ID',
{ error: e },
);
throw e;
throw new Error(`Failed to lookup runner AMI ID from SSM parameter: ${runnerParameters.amiIdSsmParameterName},
${e}`);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lambdas/functions/control-plane/src/lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function scaleUpHandler(event: SQSEvent, context: Context): Promise
if (e instanceof ScaleError) {
throw e;
} else {
logger.warn(`Ignoring error: ${(e as Error).message}`);
logger.warn(`Ignoring error: ${e}`);
}
}
}
Expand Down