in app/app.py [0:0]
def get(cls, event: EventType) -> Tuple[int, Dict[str, str]]:
user_id = event['pathParameters']['user_id']
try:
response = table.get_item(Key={'user_id': user_id})
except ClientError:
raise # TODO: Implement appropriate error handling
if 'Item' not in response:
return 404, {'message': 'No such user found'}
return 200, response['Item']