From d7f1f9fd6398b8ec23d9bdbd79f2afd8004671fc Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@allmydata.com>
Date: Thu, 6 Nov 2008 21:53:09 -0700
Subject: [PATCH] web/operations.py: if the operation failed, render the
 Failure

---
 src/allmydata/web/operations.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/allmydata/web/operations.py b/src/allmydata/web/operations.py
index e8e5a85b..2466ecda 100644
--- a/src/allmydata/web/operations.py
+++ b/src/allmydata/web/operations.py
@@ -3,7 +3,8 @@ import time
 from zope.interface import implements
 from nevow import rend, url, tags as T
 from nevow.inevow import IRequest
-from twisted.internet import reactor
+from twisted.python.failure import Failure
+from twisted.internet import reactor, defer
 from twisted.web.http import NOT_FOUND
 from twisted.web.html import escape
 from twisted.application import service
@@ -92,6 +93,10 @@ class OphandleTable(rend.Page, service.Service):
                     # this GET is collecting the ophandle, so change its timer
                     self._set_timer(ophandle, self.COLLECTED_HANDLE_LIFETIME)
 
+        status = monitor.get_status()
+        if isinstance(status, Failure):
+            return defer.fail(status)
+
         return renderer
 
     def _set_timer(self, ophandle, when):
-- 
2.45.2