diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6958393f..79a5a2f2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,7 @@ unreleased * bugfix: SQLAlcemy plugin would cause warning messages with some db connection strings that contained invalid characters for a segment/subsegment name. * bugfix: Aiohttp middleware serialized URL values incorrectly. `PR37 `_ * bugfix: Don't overwrite plugins list on each `.configure` call. `PR38 `_ +* bugfix: Do not swallow `return_value`. `PR44 `_ 0.96 ==== diff --git a/aws_xray_sdk/core/recorder.py b/aws_xray_sdk/core/recorder.py index 2b1f5437..963cf4b2 100644 --- a/aws_xray_sdk/core/recorder.py +++ b/aws_xray_sdk/core/recorder.py @@ -336,7 +336,7 @@ def record_subsegment(self, wrapped, instance, args, kwargs, name, finally: # No-op if subsegment is `None` due to `LOG_ERROR`. if subsegment is None: - return + return return_value end_time = time.time() if callable(meta_processor): diff --git a/tests/ext/botocore/test_botocore.py b/tests/ext/botocore/test_botocore.py index b9dd9c79..2e064c0b 100644 --- a/tests/ext/botocore/test_botocore.py +++ b/tests/ext/botocore/test_botocore.py @@ -122,6 +122,7 @@ def test_pass_through_on_context_missing(): with Stubber(ddb) as stubber: stubber.add_response('describe_table', response, {'TableName': 'mytable'}) - ddb.describe_table(TableName='mytable') + result = ddb.describe_table(TableName='mytable') + assert result is not None xray_recorder.configure(context_missing='RUNTIME_ERROR')