def validate_response(self, value, model_instance):

        object_name = model_instance._meta.verbose_name
        try:
            model_instance.oembed_retrieve(suppress_http_errors=False)
        except HTTPError, e:
            if e.code == 404:
                message = _('%s not found' % object_name)
            elif e.code == 401:
                message = _((
                    'This %s is marked as private; you should link to it '
                    'directly to allow the provider to regulate access control'
                ) % object_name)
            elif e.code == 501:
                message = _(
                    '%s not available in the requested format' % object_name
                )
            else:
                message = _(e.msg)
            raise ValidationError(message)
        except URLError:
            raise ValidationError(_('Unable to contact server'))
Validation method to ensure that the provider's response is valid for
dataset/ETHPy150Open chuckharmston/django-tumblelog/tumblelog/fields.py/OEmbedURLField.validate_response