(self)
return json.dumps({'error':literal(resp.body)})
Render the error document
Render the error document
Render the error document
def document(self):
        """Render the error document"""
        resp = request.environ.get('pylons.original_response')

        #content = literal(resp.body) or cgi.escape(request.GET.get('message', ''))
        #page = error_document_template % \
        #    dict(prefix=request.environ.get('SCRIPT_NAME', ''),
        #         code=cgi.escape(request.GET.get('code', str(resp.status_int))),
        #         message=content)
        
        response.content_type = 'application/json'
        return json.dumps({'error':literal(resp.body)})
def document ( self ) : resp = request . environ . get ( 'pylons.original_response' ) #content = literal(resp.body) or cgi.escape(request.GET.get('message', '')) #page = error_document_template % \ #    dict(prefix=request.environ.get('SCRIPT_NAME', ''), #         code=cgi.escape(request.GET.get('code', str(resp.status_int))), #         message=content) response . content_type = 'application/json' return json . dumps ( { 'error' : literal ( resp . body ) } )