Did I find the right examples for you? yes no

All Samples(118)  |  Call(62)  |  Derive(12)  |  Import(44)
A basic HTTP error.

@type status: C{str}
@ivar status: Refers to an HTTP status code, for example C{http.NOT_FOUND}.

@type message: C{str}
@param message: A short error message, for example "NOT FOUND".

@type response: C{bytes}
@ivar response: A complete HTML document for an error page.

src/f/e/feat-HEAD/examples/featchat/src/featchat/test/test_agents_api_web.py   feat(Download)
from zope.interface import implements
from twisted.web.client import getPage
from twisted.web.error import Error
 
from feat.test import common

src/o/h/oh-mainline-HEAD/vendor/packages/twisted/twisted/web/client.py   oh-mainline(Download)
class PartialDownloadError(error.Error):
    """
    Page was only partially downloaded, we got disconnected in middle.
 
    @ivar response: All of the response body which was downloaded.
                failure.Failure(
                    error.Error(
                        self.status, self.message, response)))
        if self.factory.method == 'HEAD':
            # Callback with empty string, since there is never a response
                failure.Failure(
                    error.Error(
                        self.status, self.message, None)))
            self.transport.loseConnection()
 

src/h/o/hortonworks-sandbox-HEAD/desktop/core/ext-py/Twisted/twisted/web/client.py   hortonworks-sandbox(Download)
class PartialDownloadError(error.Error):
    """
    Page was only partially downloaded, we got disconnected in middle.
 
    @ivar response: All of the response body which was downloaded.
                failure.Failure(
                    error.Error(
                        self.status, self.message, response)))
        if self.factory.method.upper() == 'HEAD':
            # Callback with empty string, since there is never a response
                failure.Failure(
                    error.Error(
                        self.status, self.message, None)))
            self.transport.loseConnection()
 

src/z/o/zope.app.twisted-3.5.0/src/twisted/web/client.py   zope.app.twisted(Download)
class PartialDownloadError(error.Error):
    """Page was only partially downloaded, we got disconnected in middle.
 
    The bit that was downloaded is in the response attribute.
    """
                failure.Failure(
                    error.Error(
                        self.status, self.message, response)))
        elif self.length != None and self.length != 0:
            self.factory.noPage(failure.Failure(
                failure.Failure(
                    error.Error(
                        self.status, self.message, None)))
            self.transport.loseConnection()
 

src/t/x/txAWS-0.2.3/txaws/client/base.py   txAWS(Download)
from twisted.web import http
from twisted.web.client import HTTPClientFactory
from twisted.web.error import Error as TwistedWebError
 
from txaws.util import parse
            error_message = http.RESPONSES.get(http_status)
            fallback_error = TwistedWebError(
                http_status, error_message, error.value.response)
        raise fallback_error
    elif 200 <= http_status < 300:

src/p/u/pusher-HEAD/pusher/pusher.py   pusher(Download)
from twisted.python import log
from twisted.web import resource, server
from twisted.web.error import Error
 
from apns import APNSConnection
        try:
            if 'deviceToken' not in request.args:
                raise Error(400, "Missing deviceToken argument")
            if 'payload' not in request.args:
                raise Error(400, "Missing payload argument")
                data = json.loads(payload)
            except Exception, e:
                raise Error(400, "Payload must be JSON: %s" % e)
 
            if 'aps' not in payload:
                raise Error(400, "Payload missing 'aps': %r" % payload)

src/a/u/autoresponse-0.3.1/autoresponse/__init__.py   autoresponse(Download)
    def manufacture_http_failure(status_code):
        error = twisted.web.error.Error(code=status_code)
        failure = twisted.python.failure.Failure(
            exc_value=error, exc_type=twisted.web.error.Error)
        return failure

src/p/a/paisley-0.3.1/paisley/client.py   paisley(Download)
                raise tw_error.PageRedirect(response.code, body)
            elif response.code > 399:
                raise tw_error.Error(response.code, body)
 
            return body

src/p/a/paisley-HEAD/paisley/client.py   paisley(Download)
                raise tw_error.PageRedirect(response.code, body)
            elif response.code > 399:
                raise tw_error.Error(response.code, body)
 
            return body

src/j/u/juju-0.5/juju/providers/orchestra/digestauth.py   juju(Download)
from twisted.python.failure import Failure
from twisted.web.client import HTTPClientFactory, HTTPPageGetter
from twisted.web.error import Error
 
from juju.errors import ProviderError
        else:
            self.handleStatusDefault()
            self.factory.noPage(Failure(Error(self.status, self.message)))
        self.quietLoss = True
        self.transport.loseConnection()

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8  Next