diff --git a/aws_lambda_decorators/classes.py b/aws_lambda_decorators/classes.py
index 7c66a47..ec6847a 100644
--- a/aws_lambda_decorators/classes.py
+++ b/aws_lambda_decorators/classes.py
@@ -179,11 +179,10 @@ class Parameter(ValidatedParameter, BaseParameter):
         """
         for path_key in filter(lambda item: item != "", self._path.split(PATH_DIVIDER)):
             real_key, annotation = Parameter.get_annotations_from_key(path_key)
-            if real_key in dict_value:
+            if dict_value and real_key in dict_value:
                 dict_value = decode(annotation, dict_value[real_key])
             else:
                 dict_value = self._default
-                break
 
         if not self._name:
             self._name = real_key
diff --git a/setup.py b/setup.py
index 7ecd5a1..b183be9 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
 LONG_DESCRIPTION = open("README.md").read()
 
 setup(name="aws-lambda-decorators",
-      version="0.41",
+      version="0.42",
       description="A set of python decorators to simplify aws python lambda development",
       long_description=LONG_DESCRIPTION,
       long_description_content_type="text/markdown",

Missing extract data can set incorrect name in Parameter class
With this bug it's possible to set a default value for an incorrect key when extracting a parameter. It's also possible for incorrect key names to persist across unit tests when the Parameter object persists across tests (default behaviour in python's unittest).

Testing using `extract_from_event` with data:
```py
event = {
    "body": "{}"
}
```

and handler:
```py
@extract_from_event(parameters=[Parameter(path="body[json]/optional/value", default="Hello")])
def handler(event, context, **kwargs):
    return {
        "statusCode": 200,
        "body": json.dumps(kwargs)
    }
```

The expected body would be `{"value": "Hello"}`, however the actual response is currently `{"optional": "Hello"}`
diff --git a/tests/test_decorators.py b/tests/test_decorators.py
index 206965d..3739638 100644
--- a/tests/test_decorators.py
+++ b/tests/test_decorators.py
@@ -1,9 +1,14 @@
 # pylint:disable=too-many-lines
+from http import HTTPStatus
+import json
+from json import JSONDecodeError
 import unittest
 from unittest.mock import patch, MagicMock
-from json import JSONDecodeError
+from uuid import uuid4
+
 from botocore.exceptions import ClientError
 from schema import Schema, And, Optional
+
 from aws_lambda_decorators.classes import ExceptionHandler, Parameter, SSMParameter, ValidatedParameter
 from aws_lambda_decorators.decorators import extract, extract_from_event, extract_from_context, handle_exceptions, \
     log, response_body_as_json, extract_from_ssm, validate, handle_all_exceptions, cors
@@ -1496,3 +1501,76 @@ class DecoratorsTests(unittest.TestCase):  # noqa: pylint - too-many-public-meth
 
         response = handler(dictionary, None)
         self.assertEqual(None, response)
+
+    def test_extract_from_event_missing_parameter_path(self):
+        event = {
+            "body": "{}"
+        }
+
+        @extract_from_event(parameters=[Parameter(path="body[json]/optional/value", default="Hello")])
+        def handler(event, context, **kwargs):  # noqa
+            return {
+                "statusCode": HTTPStatus.OK,
+                "body": json.dumps(kwargs)
+            }
+
+        expected_body = json.dumps({
+            "value": "Hello"
+        })
+
+        response = handler(event, None)
+
+        self.assertEqual(HTTPStatus.OK, response["statusCode"])
+        self.assertEqual(expected_body, response["body"])
+
+
+class IsolatedDecoderTests(unittest.TestCase):
+    # Tests have been named so they run in a specific order
+
+    ID_PATTERN = "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
+
+    PARAMETERS = [
+        Parameter(path="pathParameters/test_id", validators=[Mandatory, RegexValidator(ID_PATTERN)]),
+        Parameter(path="body[json]/name", validators=[MaxLength(255)])
+    ]
+
+    def test_01_extract_from_event_400(self):
+        event = {
+            "pathParameters": {}
+        }
+
+        @extract_from_event(parameters=self.PARAMETERS, group_errors=True, allow_none_defaults=False)
+        def handler(event, context, **kwargs):  # noqa
+            return kwargs
+
+        response = handler(event, None)
+        self.assertEqual(HTTPStatus.BAD_REQUEST, response["statusCode"])
+
+    def test_02_extract_from_event_200(self):
+        test_id = str(uuid4())
+
+        event = {
+            "pathParameters": {
+                "test_id": test_id
+            },
+            "body": json.dumps({
+                "name": "Gird"
+            })
+        }
+
+        @extract_from_event(parameters=self.PARAMETERS, group_errors=True, allow_none_defaults=False)
+        def handler(event, context, **kwargs):  # noqa
+            return {
+                "statusCode": HTTPStatus.OK,
+                "body": json.dumps(kwargs)
+            }
+
+        expected_body = json.dumps({
+            "test_id": test_id,
+            "name": "Gird"
+        })
+
+        response = handler(event, None)
+
+        self.assertEqual(HTTPStatus.OK, response["statusCode"])
+        self.assertEqual(expected_body, response["body"])

pip install -e .
parse_log_pytest
requirements.txt
coverage bandit prospector pylint_quotes pytest
apt-get update apt-get install -y gcc pip install -q PyJWT boto3 prospector coverage bandit schema pylint_quotes
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
astroid==3.3.9
-e git+https://github.com/gridsmartercities/aws-lambda-decorators.git@a1e4059f360920d876d8310644b82dbe7a4967db#egg=aws_lambda_decorators
bandit==1.8.3
boto3==1.37.23
botocore==1.37.23
coverage==7.8.0
dill==0.3.9
dodgy==0.2.1
exceptiongroup==1.2.2
flake8==7.2.0
flake8-polyfill==1.0.2
gitdb==4.0.12
GitPython==3.1.44
iniconfig==2.1.0
isort==6.0.1
jmespath==1.0.1
markdown-it-py==3.0.0
mccabe==0.7.0
mdurl==0.1.2
packaging==24.2
pbr==6.1.1
pep8-naming==0.10.0
platformdirs==4.3.7
pluggy==1.5.0
prospector==1.16.1
pycodestyle==2.13.0
pydocstyle==6.3.0
pyflakes==3.3.2
Pygments==2.19.1
PyJWT==2.10.1
pylint==3.3.6
pylint-celery==0.3
pylint-django==2.6.1
pylint-plugin-utils==0.8.2
pylint-quotes==0.2.3
pytest==8.3.5
python-dateutil==2.9.0.post0
PyYAML==6.0.2
requirements-detector==1.3.2
rich==14.0.0
s3transfer==0.11.4
schema==0.7.7
semver==3.0.4
setoptconf-tmp==0.3.1
six==1.17.0
smmap==5.0.2
snowballstemmer==2.2.0
stevedore==5.4.1
toml==0.10.2
tomli==2.2.1
tomlkit==0.13.2
typing_extensions==4.13.0
urllib3==1.26.20

name: aws-lambda-decorators
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - astroid==3.3.9
      - bandit==1.8.3
      - boto3==1.37.23
      - botocore==1.37.23
      - coverage==7.8.0
      - dill==0.3.9
      - dodgy==0.2.1
      - exceptiongroup==1.2.2
      - flake8==7.2.0
      - flake8-polyfill==1.0.2
      - gitdb==4.0.12
      - gitpython==3.1.44
      - iniconfig==2.1.0
      - isort==6.0.1
      - jmespath==1.0.1
      - markdown-it-py==3.0.0
      - mccabe==0.7.0
      - mdurl==0.1.2
      - packaging==24.2
      - pbr==6.1.1
      - pep8-naming==0.10.0
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - prospector==1.16.1
      - pycodestyle==2.13.0
      - pydocstyle==6.3.0
      - pyflakes==3.3.2
      - pygments==2.19.1
      - pyjwt==2.10.1
      - pylint==3.3.6
      - pylint-celery==0.3
      - pylint-django==2.6.1
      - pylint-plugin-utils==0.8.2
      - pylint-quotes==0.2.3
      - pytest==8.3.5
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.2
      - requirements-detector==1.3.2
      - rich==14.0.0
      - s3transfer==0.11.4
      - schema==0.7.7
      - semver==3.0.4
      - setoptconf-tmp==0.3.1
      - six==1.17.0
      - smmap==5.0.2
      - snowballstemmer==2.2.0
      - stevedore==5.4.1
      - toml==0.10.2
      - tomli==2.2.1
      - tomlkit==0.13.2
      - typing-extensions==4.13.0
      - urllib3==1.26.20
prefix: /opt/conda/envs/aws-lambda-decorators

tests/test_decorators.py::DecoratorsTests::test_extract_from_event_missing_parameter_path tests/test_decorators.py::IsolatedDecoderTests::test_02_extract_from_event_200
tests/test_decorators.py::DecoratorsTests::test_can_get_value_from_dict_with_jwt_by_path
tests/test_decorators.py::DecoratorsTests::test_body_dump_raises_exception_on_invalid_json tests/test_decorators.py::DecoratorsTests::test_body_gets_dumped_as_json tests/test_decorators.py::DecoratorsTests::test_can_add_name_to_parameter tests/test_decorators.py::DecoratorsTests::test_can_get_dict_value_from_dict_by_path tests/test_decorators.py::DecoratorsTests::test_can_get_value_from_dict_by_path tests/test_decorators.py::DecoratorsTests::test_can_get_value_from_dict_with_json_by_path tests/test_decorators.py::DecoratorsTests::test_can_not_add_non_pythonic_var_name_to_parameter tests/test_decorators.py::DecoratorsTests::test_can_not_add_pythonic_keyword_as_name_to_parameter tests/test_decorators.py::DecoratorsTests::test_can_not_validate_non_pythonic_var_name tests/test_decorators.py::DecoratorsTests::test_can_output_custom_error_message_on_validation_failure tests/test_decorators.py::DecoratorsTests::test_cors_adds_correct_headers_only tests/test_decorators.py::DecoratorsTests::test_cors_cannot_decorate_non_dict tests/test_decorators.py::DecoratorsTests::test_cors_invalid_max_age_logs_error tests/test_decorators.py::DecoratorsTests::test_cors_no_headers_in_response tests/test_decorators.py::DecoratorsTests::test_cors_with_headers_a_none_value_does_not_remove_headers tests/test_decorators.py::DecoratorsTests::test_cors_with_headers_an_empty_value_does_not_remove_headers tests/test_decorators.py::DecoratorsTests::test_cors_with_headers_in_response tests/test_decorators.py::DecoratorsTests::test_cors_with_uppercase_headers_in_response tests/test_decorators.py::DecoratorsTests::test_enum_validator_returns_true_when_none_is_passed_in tests/test_decorators.py::DecoratorsTests::test_error_extracting_non_numeric_parameter_with_maximum tests/test_decorators.py::DecoratorsTests::test_error_extracting_non_numeric_parameter_with_minimum tests/test_decorators.py::DecoratorsTests::test_error_extracting_parameter_with_max_length tests/test_decorators.py::DecoratorsTests::test_error_extracting_parameter_with_maximum tests/test_decorators.py::DecoratorsTests::test_error_extracting_parameter_with_min_length tests/test_decorators.py::DecoratorsTests::test_error_extracting_parameter_with_minimum tests/test_decorators.py::DecoratorsTests::test_exception_handler_raises_exception tests/test_decorators.py::DecoratorsTests::test_exception_handler_raises_exception_with_status_code tests/test_decorators.py::DecoratorsTests::test_exception_handler_raises_exception_without_friendly_message tests/test_decorators.py::DecoratorsTests::test_exit_on_error_false_bundles_all_errors tests/test_decorators.py::DecoratorsTests::test_extract_does_not_raise_an_error_on_missing_optional_key tests/test_decorators.py::DecoratorsTests::test_extract_does_not_raise_an_error_on_valid_regex_key tests/test_decorators.py::DecoratorsTests::test_extract_from_context_calls_function_with_extra_kwargs tests/test_decorators.py::DecoratorsTests::test_extract_from_event_calls_function_with_extra_kwargs tests/test_decorators.py::DecoratorsTests::test_extract_from_event_calls_function_with_extra_kwargs_bool_false tests/test_decorators.py::DecoratorsTests::test_extract_from_event_calls_function_with_extra_kwargs_bool_true tests/test_decorators.py::DecoratorsTests::test_extract_mandatory_parameter_with_length_range tests/test_decorators.py::DecoratorsTests::test_extract_mandatory_parameter_with_max_length tests/test_decorators.py::DecoratorsTests::test_extract_mandatory_parameter_with_maximum tests/test_decorators.py::DecoratorsTests::test_extract_mandatory_parameter_with_min_length tests/test_decorators.py::DecoratorsTests::test_extract_mandatory_parameter_with_minimum tests/test_decorators.py::DecoratorsTests::test_extract_mandatory_parameter_with_range tests/test_decorators.py::DecoratorsTests::test_extract_nulls_are_returned tests/test_decorators.py::DecoratorsTests::test_extract_nulls_default_on_decorator_takes_precedence tests/test_decorators.py::DecoratorsTests::test_extract_nulls_preserve_signature_defaults tests/test_decorators.py::DecoratorsTests::test_extract_nulls_raises_exception_when_extracted_from_kwargs_if_allow_none_defaults_is_false tests/test_decorators.py::DecoratorsTests::test_extract_optional_null_parameter_with_max_length tests/test_decorators.py::DecoratorsTests::test_extract_optional_null_parameter_with_maximum tests/test_decorators.py::DecoratorsTests::test_extract_optional_null_parameter_with_min_length tests/test_decorators.py::DecoratorsTests::test_extract_optional_null_parameter_with_minimum tests/test_decorators.py::DecoratorsTests::test_extract_parameter_with_mainimum_length tests/test_decorators.py::DecoratorsTests::test_extract_parameter_with_maximum tests/test_decorators.py::DecoratorsTests::test_extract_parameter_with_maximum_length tests/test_decorators.py::DecoratorsTests::test_extract_parameter_with_minimum tests/test_decorators.py::DecoratorsTests::test_extract_returns_400_on_empty_path tests/test_decorators.py::DecoratorsTests::test_extract_returns_400_on_invalid_bool_type tests/test_decorators.py::DecoratorsTests::test_extract_returns_400_on_invalid_dictionary_schema tests/test_decorators.py::DecoratorsTests::test_extract_returns_400_on_invalid_float_type tests/test_decorators.py::DecoratorsTests::test_extract_returns_400_on_invalid_regex_key tests/test_decorators.py::DecoratorsTests::test_extract_returns_400_on_missing_mandatory_key tests/test_decorators.py::DecoratorsTests::test_extract_returns_400_on_missing_mandatory_key_with_regex tests/test_decorators.py::DecoratorsTests::test_extract_returns_400_on_type_error tests/test_decorators.py::DecoratorsTests::test_extract_returns_400_on_value_not_in_list tests/test_decorators.py::DecoratorsTests::test_extract_succeeds_with_valid_type_validation tests/test_decorators.py::DecoratorsTests::test_extract_suceeds_with_valid_enum_validation tests/test_decorators.py::DecoratorsTests::test_extract_valid_dictionary_schema tests/test_decorators.py::DecoratorsTests::test_get_ssm_parameter_empty_key_container_raises_key_error tests/test_decorators.py::DecoratorsTests::test_get_ssm_parameter_missing_parameter_raises_client_error tests/test_decorators.py::DecoratorsTests::test_get_valid_ssm_parameter tests/test_decorators.py::DecoratorsTests::test_get_valid_ssm_parameter_custom_name tests/test_decorators.py::DecoratorsTests::test_get_valid_ssm_parameters tests/test_decorators.py::DecoratorsTests::test_group_errors_true_on_extract_from_context_returns_ok tests/test_decorators.py::DecoratorsTests::test_group_errors_true_on_extract_from_event_returns_ok tests/test_decorators.py::DecoratorsTests::test_group_errors_true_returns_ok tests/test_decorators.py::DecoratorsTests::test_handle_all_exceptions tests/test_decorators.py::DecoratorsTests::test_log_decorator_can_log_params tests/test_decorators.py::DecoratorsTests::test_log_decorator_can_log_response tests/test_decorators.py::DecoratorsTests::test_mandatory_parameter_with_default_returns_error_on_empty tests/test_decorators.py::DecoratorsTests::test_raises_decode_error_convert_json_string_to_dict tests/test_decorators.py::DecoratorsTests::test_response_as_json_invalid_application_does_nothing tests/test_decorators.py::DecoratorsTests::test_type_validator_returns_true_when_none_is_passed_in tests/test_decorators.py::DecoratorsTests::test_validate_does_not_raise_an_error_on_valid_variables tests/test_decorators.py::DecoratorsTests::test_validate_raises_an_error_on_invalid_variables tests/test_decorators.py::DecoratorsTests::test_validate_raises_multiple_errors_on_exit_on_error_false tests/test_decorators.py::DecoratorsTests::test_values_are_stringified_in_max_length_validator tests/test_decorators.py::DecoratorsTests::test_values_are_stringified_in_min_length_validator tests/test_decorators.py::IsolatedDecoderTests::test_01_extract_from_event_400
setup.py aws_lambda_decorators/classes.py
setup.py aws_lambda_decorators/classes.py