From e2c01ec22b1ccaf45a2a53f303219f225347c26d Mon Sep 17 00:00:00 2001 From: Doug Keen Date: Thu, 10 Nov 2016 20:08:21 -0800 Subject: [PATCH] Properly handle non-200 responses on multi-url requests --- embedly/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/embedly/client.py b/embedly/client.py index cfda2df..34fa6d9 100644 --- a/embedly/client.py +++ b/embedly/client.py @@ -136,6 +136,10 @@ def _get(self, version, method, url_or_urls, **kwargs): if kwargs.get('raw', False): data['raw'] = content + elif multi: + data = [{'type': 'error', + 'error': True, + 'error_code': int(resp['status'])}] * len(url_or_urls) else: data = {'type': 'error', 'error': True,