The recent lazr.restful exception changes broke this. The exception handler in lazr.restful._resource gets the view for the exception, somewhat like this:
Traceback (most recent call last):
File "/home/wgrant/launchpad/lp-sourcedeps/eggs/zope.publisher-3.12.0-py2.6.egg/zope/publisher/publish.py", line 134, in publish
result = publication.callObject(request, obj)
File "/home/wgrant/launchpad/lp-sourcedeps/eggs/lazr.restful-0.18.1-py2.6.egg/lazr/restful/publisher.py", line 211, in callObject
WebServicePublicationMixin, self).callObject(request, object)
File "/home/wgrant/launchpad/lp-branches/devel/lib/canonical/launchpad/webapp/publication.py", line 488, in callObject
return mapply(ob, request.getPositionalArguments(), request)
File "/home/wgrant/launchpad/lp-sourcedeps/eggs/zope.publisher-3.12.0-py2.6.egg/zope/publisher/publish.py", line 109, in mapply
return debug_call(obj, args)
File "/home/wgrant/launchpad/lp-sourcedeps/eggs/zope.publisher-3.12.0-py2.6.egg/zope/publisher/publish.py", line 115, in debug_call
return obj(*args)
File "/home/wgrant/launchpad/lp-sourcedeps/eggs/lazr.restful-0.18.1-py2.6.egg/lazr/restful/_resource.py", line 923, in __call__
view = getMultiAdapter((e, self.request), name="index.html")
File "/home/wgrant/launchpad/lp-sourcedeps/eggs/zope.component-3.9.3-py2.6.egg/zope/component/_api.py", line 109, in getMultiAdapter
adapter = queryMultiAdapter(objects, interface, name, context=context)
File "/home/wgrant/launchpad/lp-sourcedeps/eggs/zope.component-3.9.3-py2.6.egg/zope/component/_api.py", line 122, in queryMultiAdapter
return sitemanager.queryMultiAdapter(objects, interface, name, default)
File "/home/wgrant/launchpad/lp-sourcedeps/eggs/zope.component-3.9.3-py2.6.egg/zope/component/registry.py", line 240, in queryMultiAdapter
objects, interface, name, default)
File "/home/wgrant/launchpad/lp-sourcedeps/eggs/zope.interface-3.5.2-py2.6-linux-x86_64.egg/zope/interface/adapter.py", line 526, in queryMultiAdapter
result = factory(*objects)
File "/home/wgrant/launchpad/lp-branches/devel/lib/canonical/launchpad/webapp/error.py", line 246, in __init__
clear_request_started()
File "/home/wgrant/launchpad/lp-branches/devel/lib/canonical/launchpad/webapp/adapter.py", line 205, in clear_request_started
raise Exception("I should not be called here!")
So it instantiates the error handling view, which resets the request in __init__ so the page can actually do stuff.
The recent lazr.restful exception changes broke this. The exception handler in lazr.restful. _resource gets the view for the exception, somewhat like this:
Traceback (most recent call last): wgrant/ launchpad/ lp-sourcedeps/ eggs/zope. publisher- 3.12.0- py2.6.egg/ zope/publisher/ publish. py", line 134, in publish callObject( request, obj) wgrant/ launchpad/ lp-sourcedeps/ eggs/lazr. restful- 0.18.1- py2.6.egg/ lazr/restful/ publisher. py", line 211, in callObject ublicationMixin , self).callObjec t(request, object) wgrant/ launchpad/ lp-branches/ devel/lib/ canonical/ launchpad/ webapp/ publication. py", line 488, in callObject getPositionalAr guments( ), request) wgrant/ launchpad/ lp-sourcedeps/ eggs/zope. publisher- 3.12.0- py2.6.egg/ zope/publisher/ publish. py", line 109, in mapply wgrant/ launchpad/ lp-sourcedeps/ eggs/zope. publisher- 3.12.0- py2.6.egg/ zope/publisher/ publish. py", line 115, in debug_call wgrant/ launchpad/ lp-sourcedeps/ eggs/lazr. restful- 0.18.1- py2.6.egg/ lazr/restful/ _resource. py", line 923, in __call__ wgrant/ launchpad/ lp-sourcedeps/ eggs/zope. component- 3.9.3-py2. 6.egg/zope/ component/ _api.py" , line 109, in getMultiAdapter er(objects, interface, name, context=context) wgrant/ launchpad/ lp-sourcedeps/ eggs/zope. component- 3.9.3-py2. 6.egg/zope/ component/ _api.py" , line 122, in queryMultiAdapter queryMultiAdapt er(objects, interface, name, default) wgrant/ launchpad/ lp-sourcedeps/ eggs/zope. component- 3.9.3-py2. 6.egg/zope/ component/ registry. py", line 240, in queryMultiAdapter wgrant/ launchpad/ lp-sourcedeps/ eggs/zope. interface- 3.5.2-py2. 6-linux- x86_64. egg/zope/ interface/ adapter. py", line 526, in queryMultiAdapter wgrant/ launchpad/ lp-branches/ devel/lib/ canonical/ launchpad/ webapp/ error.py" , line 246, in __init__ request_ started( ) wgrant/ launchpad/ lp-branches/ devel/lib/ canonical/ launchpad/ webapp/ adapter. py", line 205, in clear_request_ started
File "/home/
result = publication.
File "/home/
WebServiceP
File "/home/
return mapply(ob, request.
File "/home/
return debug_call(obj, args)
File "/home/
return obj(*args)
File "/home/
view = getMultiAdapter((e, self.request), name="index.html")
File "/home/
adapter = queryMultiAdapt
File "/home/
return sitemanager.
File "/home/
objects, interface, name, default)
File "/home/
result = factory(*objects)
File "/home/
clear_
File "/home/
raise Exception("I should not be called here!")
So it instantiates the error handling view, which resets the request in __init__ so the page can actually do stuff.