Skip to content
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

fix: crashing if handler is missing #6288

Merged
merged 7 commits into from
Nov 22, 2023
Merged

fix: crashing if handler is missing #6288

merged 7 commits into from
Nov 22, 2023

Conversation

sidhujus
Copy link
Contributor

@sidhujus sidhujus commented Nov 17, 2023

Which issue(s) does this change fix?

#6253

Why is this change necessary?

There is currently no validation on if the handler is defined within a template

How does it address the issue?

Checks if the handler is defined before trying to access and assign it

What side effects does this change have?

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added area/build sam build command pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Nov 17, 2023
@sidhujus sidhujus marked this pull request as ready for review November 20, 2023 18:34
@sidhujus sidhujus requested a review from a team as a code owner November 20, 2023 18:34
Copy link
Contributor

@jysheng123 jysheng123 left a comment

Choose a reason for hiding this comment

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

I would add a unit test raising the specific error thrown without the handler present other than that LGTM

Copy link
Contributor

@jysheng123 jysheng123 left a comment

Choose a reason for hiding this comment

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

Once the above comments are addressed it LGTM!

Copy link
Contributor

@lucashuy lucashuy left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the blank string Handler, left a comment about testing

Copy link
Contributor

@lucashuy lucashuy left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the changes

@sidhujus sidhujus added this pull request to the merge queue Nov 22, 2023
Merged via the queue into aws:develop with commit dca0cb9 Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build sam build command pr/internal stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants