Properly handle terminated channel on channel's playlist and about page

This commit is contained in:
James Taylor
2018-12-21 01:59:33 -08:00
parent e499ff6185
commit dca25bd4cc
3 changed files with 36 additions and 22 deletions

View File

@@ -115,6 +115,10 @@ def site_dispatch(env, start_response):
yield error_code('404 Not Found', start_response)
return
except http_errors.Code200 as e: # Raised in scenarios where a simple status message is to be returned, such as a terminated channel
start_response('200 OK', ())
yield str(e).encode('utf-8')
except http_errors.Error404 as e:
start_response('404 Not Found', ())
yield str(e).encode('utf-8')