Skip to content

Conversation

awood45
Copy link
Contributor

@awood45 awood45 commented Jan 21, 2021

In HTTP API authorizers, we don't yet handle intrinsics, and an attempt
to use them creates a crash when it tries to hash the input dict. This
change starts by wrapping that use case properly so that a helpful error
is raised until intrinsics are supported here.

Note: Does not yet handle !Sub, looking at options for that.

Checklist:

  • Write/update tests
  • make pr passes
  • Update documentation
  • Verify transformed template deploys and application functions as expected

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

In HTTP API authorizers, we don't yet handle intrinsics, and an attempt
to use them creates a crash when it tries to hash the input `dict`. This
change starts by wrapping that use case properly so that a helpful error
is raised until intrinsics are supported here.

Note: Does not yet handle `!Sub`, looking at options for that.
@codecov-io
Copy link

codecov-io commented Jan 21, 2021

Codecov Report

Merging #1896 (a9e5387) into develop (e29c42e) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1896      +/-   ##
===========================================
+ Coverage    93.84%   93.89%   +0.05%     
===========================================
  Files           89       89              
  Lines         5881     5885       +4     
  Branches      1203     1205       +2     
===========================================
+ Hits          5519     5526       +7     
+ Misses         166      164       -2     
+ Partials       196      195       -1     
Impacted Files Coverage Δ
samtranslator/model/api/http_api_generator.py 91.18% <100.00%> (+0.12%) ⬆️
samtranslator/translator/logical_id_generator.py 100.00% <0.00%> (+9.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e29c42e...a9e5387. Read the comment docs.

Should not raise, making that explicit.
@awood45 awood45 merged commit 5e2e61b into aws:develop Jan 25, 2021
mgrandis pushed a commit to mgrandis/serverless-application-model that referenced this pull request Mar 2, 2021
* Better Error Handling of Intrinsics

In HTTP API authorizers, we don't yet handle intrinsics, and an attempt
to use them creates a crash when it tries to hash the input `dict`. This
change starts by wrapping that use case properly so that a helpful error
is raised until intrinsics are supported here.

Note: Does not yet handle `!Sub`, looking at options for that.

* Add "NoValue" Test Case

Should not raise, making that explicit.
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.

4 participants