steven_litvack-winkler
10/05/2022, 8:26 PMoptional
parameter and override the validate_response method in my stream class (which subclasses RestStream) with
def validate_response(self, response: requests.Response) -> None:
"""Updating validation to handle special case of 403"""
if self.optional and response.status_code == 403:
self.logger.warning(
f"403 Forbidden Error at stream: {self.name}. "
f"Continuing because stream is marked as optional."
)
else:
super().validate_response(response)
If this is triggered, my target will receive no records and then write an empty file.
Mainly curious if anyone else has encountered this and if it could/should be built in to the singer sdk.