Ignore:
Timestamp:
Dec 3, 2008 9:41:58 AM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
375ca67
Parents:
46a0f7a
Message:

Differentiate between a failure to connect to a service and the service being
provided using an unexpected protocol. Deal with the internal connection error
more cleanly when the connection is being made to an internal service. That
is, when an internal service is down, propagate a clean error out to the
caller. Before this change, the internal service failure would look like a
protocol error on the external service (SOAP being provided by XMLRPC, for
example) and try the other protocol, which would fail with a misleading error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/remote_service.py

    r46a0f7a r9d3e646  
    346346                    { self.request_body_name: r}, self.encap_fedids))
    347347        except socket_error, e:
    348             raise service_error(service_error.protocol,
     348            raise service_error(service_error.connect,
    349349                    "Cannot connect to %s: %s" % (url, e[1]))
    350350        except SSLError, e:
    351             raise service_error(service_error.protocol,
     351            raise service_error(service_error.connect,
    352352                    "SSL error contacting %s: %s" % (url, e.message))
    353353        except Fault, f:
     
    407407            resp = remote_method(msg)
    408408        except socket_error, e:
    409             raise service_error(service_error.protocol,
     409            raise service_error(service_error.connect,
    410410                    "Cannot connect to %s: %s" % (url, e[1]))
    411411        except SSLError, e:
    412             raise service_error(service_error.protocol,
     412            raise service_error(service_error.connect,
    413413                    "SSL error contacting %s: %s" % (url, e.message))
    414414        except ParseException, e:
Note: See TracChangeset for help on using the changeset viewer.