PreTokenGenerationTriggerEvent => claims_to_suppress : NoneType' object does not support item assignment
See original GitHub issueWhat were you trying to accomplish? I’m currently trying to add some claims to suppress to the token in the event object. Working with manual way (without your lib).
Expected Behavior
No exception
Current Behavior
Exception
Possible Solution
Steps to Reproduce (for bugs)
def handler(event, context):
event: PreTokenGenerationTriggerEvent = PreTokenGenerationTriggerEvent(event)
user_pool_id = event.user_pool_id
claims_override_details = event.response.claims_override_details
claims_override_details.claims_to_suppress = ["Email"]
Environment
- Powertools version used: 1.22.0
- Packaging format (Layers, PyPi):
- AWS Lambda function runtime: Python 3.9
- Debugging logs
"exception": "Traceback (most recent call last):\n File \"/var/task/main.py\", line 130, in handler\n claims_override_details.claims_to_suppress = []\n File \"/var/task/package/aws_lambda_powertools/utilities/data_classes/cognito_user_pool_event.py\", line 487, in claims_to_suppress\n self._data[\"claimsToSuppress\"] = value\nTypeError: 'NoneType' object does not support item assignment"
2021-12-05 21:13:10,898 aws_lambda_powertools.logging.logger [DEBUG] Adding filter in root logger to suppress child logger records to bubble up
2021-12-05 21:13:10,898 aws_lambda_powertools.logging.logger [DEBUG] Marking logger service_undefined as preconfigured
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
'NoneType' object does not support item assignment, even ...
I am self working on an inventory system project, and currently trying to edit key values in my list of dictionaries. When trying...
Read more >TypeError: 'NoneType' object does not support item assignment
Since the plugin active, began to appear the following errors in the debug log trac: 0.11.7 and 0.12.5 happens in. Trac[main] ERROR: Exception...
Read more >Chapter 7 questions - Course - Hugging Face Forums
Hi - this is a relatively simple question but i'm totally new to ... TypeError: 'NoneType' object does not support item assignment.
Read more >TypeError: 'NoneType' object does not support item ...
During tests with the current python-openstackclient master, we get the following error: ERROR: openstackclient.shell Traceback (most recent ...
Read more >'None Type' object does not support item assignment - Intellipaat
The issue is being caused because in your function makeNewFish() you are not returning anything. I think you should return the variable fi....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @michaelbrewer, I don’t have the event right now on the hand. I will come back to you with my sample monday
@michaelbrewer There is my event from aws, so yes claimsOverrideDetails is null by default