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(python): clear error message when trying to serialize function #824

Merged
merged 1 commit into from
Sep 27, 2019

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Sep 26, 2019

A common error seems to be to try to pass a function as a parameter
into a JSII call (have seen 3 occurrences of this in the last week).

Previously, this call would fail when trying to assing the
__jsii_type__ property to the function object.

Specifically catch this case to give a helpful error message.

Fixes aws/aws-cdk#4064.
Related to #806


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

A common error seems to be to try to pass a function as a parameter
into a JSII call (have seen 3 occurrences of this in the last week).

Previously, this call would fail when trying to assing the
`__jsii_type__` property to the function object.

Specifically catch this case to give a helpful error message.

Fixes aws/aws-cdk#4064.
@rix0rrr rix0rrr requested review from garnaat and a team as code owners September 26, 2019 12:03
@rix0rrr rix0rrr self-assigned this Sep 26, 2019
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@rix0rrr rix0rrr merged commit 2eb6422 into master Sep 27, 2019
@rix0rrr rix0rrr deleted the huijbers/check-function branch September 27, 2019 08:13
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.

Python jsii: trying to serialize a function (after forgetting to call it) yields a very obscure error message
3 participants