Skip to content

Commit

Permalink
If an error occurs in get_body_info, make sure to output it to the co…
Browse files Browse the repository at this point in the history
…sole
  • Loading branch information
Wout Feys committed Sep 16, 2024
1 parent c7b57de commit 555328b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aikido_zen/api_discovery/get_body_info.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Exports get_body_info function"""

from aikido_zen.helpers.logging import logger
from aikido_zen.helpers.env_vars.feature_flags import is_feature_enabled
from .get_body_data_type import get_body_data_type
from .get_data_schema import get_data_schema
Expand All @@ -21,5 +22,6 @@ def get_body_info(context):
"type": get_body_data_type(context.headers),
"schema": get_data_schema(data),
}
except Exception:
except Exception as e:
logger.debug("Exception occured whilst getting body data : %s", e)

Check warning on line 26 in aikido_zen/api_discovery/get_body_info.py

View check run for this annotation

Codecov / codecov/patch

aikido_zen/api_discovery/get_body_info.py#L25-L26

Added lines #L25 - L26 were not covered by tests
return None

0 comments on commit 555328b

Please sign in to comment.