Skip to content

Commit

Permalink
Atrapo errores de request al momento de restaurar un dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
lrromero committed Oct 7, 2019
1 parent 879da46 commit 8354925
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pydatajson/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import logging
import traceback
from ckanapi.errors import NotFound, CKANAPIError
from requests import RequestException

from pydatajson.constants import REQUESTS_TIMEOUT, DEFAULT_TIMEZONE
from pydatajson.custom_exceptions import NumericDistributionIdentifierError
Expand Down Expand Up @@ -688,7 +689,7 @@ def restore_organization_to_ckan(catalog, owner_org, portal_url, apikey,
origin_tz=origin_tz,
dst_tz=dst_tz)
restored.append(restored_id)
except (CKANAPIError, KeyError, AttributeError,
except (CKANAPIError, KeyError, AttributeError, RequestException,
NumericDistributionIdentifierError) as e:
logger.exception('Ocurrió un error restaurando el dataset {}: {}'
.format(dataset_id, str(e)))
Expand Down

0 comments on commit 8354925

Please sign in to comment.