Got this one today from a long running job ```re...
# singer-tap-development
v
Got this one today from a long running job
Copy code
requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer')
I'm surprised I"m the first one to hit this as it didn't retry via backoff. Diving into the requests code base a bit that raised this
requests.models.Response
Copy code
def iter_content(self, chunk_size=1, decode_unicode=False):
        """Iterates over the response data.  When stream=True is set on the
        request, this avoids reading the content at once into memory for
        large responses.  The chunk size is the number of bytes it should
        read into memory.  This is not necessarily the length of each item
        returned as decoding can take place.

        chunk_size must be of type int or None. A value of None will
        function differently depending on the value of `stream`.
        stream=True will read data as it arrives in whatever size the
        chunks are received. If stream=False, data is returned as
        a single chunk.

        If decode_unicode is True, content will be decoded using the best
        available encoding based on the response.
        """

        def generate():
            # Special case for urllib3.
            if hasattr(self.raw, "stream"):
                try:
                    yield from self.raw.stream(chunk_size, decode_content=True)
                except ProtocolError as e:
                    raise ChunkedEncodingError(e)
                except DecodeError as e:
                    raise ContentDecodingError(e)
                except ReadTimeoutError as e:
                    raise ConnectionError(e)
                except SSLError as e:
                    raise RequestsSSLError(e)
Looks like we could want to retry on all of these, ChunkedEncodingError, ContentDecodingError, and RequestsSSLError? That's what I"m going to do, curious on thoughts!
e
Yeah, I think it’s safe to assume those can all be safely retried for streamed requests. ezpz PR too 😁
v
I'll get the two prs in hopefully today maybe this weekend :)
Keep jumping lol
e
Awesome, thanks @visch!