mik-laj commented on a change in pull request #13499:
URL: https://github.com/apache/airflow/pull/13499#discussion_r552340025
##########
File path: airflow/providers/http/sensors/http.py
##########
@@ -90,7 +96,8 @@ def __init__(
self.headers = headers or {}
self.extra_options = extra_options or {}
self.response_check = response_check
-
+ self.acceptable_status_code = acceptable_status_code or []
+ self.acceptable_status_code.append(404)
Review comment:
This will add a new item every time the operator is initialized. When
this operator is initialized multiple times, this element will also be added
multiple times.
```
MY_API_ERROR_CODES=[500]
HttpSensor(acceptable_status_code=MY_API_ERROR_CODES)
HttpSensor(acceptable_status_code=MY_API_ERROR_CODES)
assert MY_API_ERROR_CODES = [500, 404, 404]
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]