goransh-buh opened a new issue, #69595:
URL: https://github.com/apache/airflow/issues/69595
## Bug Report
### Description
Some functions do not validate their inputs before processing, which can
lead to confusing error messages or silent failures when unexpected values are
passed.
### Steps to Reproduce
1. Call the affected function with `None`, an empty string, or a negative
number
2. Observe that the error message is not helpful or the function silently
returns incorrect results
### Expected Behavior
Functions should validate inputs early and raise descriptive errors:
```python
def process(value):
if value is None:
raise ValueError("value must not be None")
if not isinstance(value, int):
raise TypeError(f"expected int, got {type(value).__name__}")
# ... rest of function
```
### Impact
This makes debugging harder for users of the library and can hide real bugs
upstream.
### Suggested Fix
Add input validation at the start of public-facing functions with clear
error messages.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]