← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~gz/python-oops-tools/error_templates into lp:python-oops-tools

 

Martin Packman has proposed merging lp:~gz/python-oops-tools/error_templates into lp:python-oops-tools.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~gz/python-oops-tools/error_templates/+merge/116031

Currently going to <https://oops.canonical.com/somethingnonexistant> results not in a 404 as expected but an oops. Which is a little cute, but is also the only fault currently reported with the service in the daily emails.

This branch adds trivial templates for the default 404 and 500 handlers so a client gets a (semi) meaningful response rather than a knock-on failure.

-- 
https://code.launchpad.net/~gz/python-oops-tools/error_templates/+merge/116031
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~gz/python-oops-tools/error_templates into lp:python-oops-tools.
=== added file 'src/oopstools/oops/templates/404.html'
--- src/oopstools/oops/templates/404.html	1970-01-01 00:00:00 +0000
+++ src/oopstools/oops/templates/404.html	2012-07-20 16:45:44 +0000
@@ -0,0 +1,5 @@
+{% extends "error.html" %}
+
+{% block title %}404{% endblock %}
+
+{% block description %}No resource at {{request_path}} found.{% endblock %}

=== added file 'src/oopstools/oops/templates/500.html'
--- src/oopstools/oops/templates/500.html	1970-01-01 00:00:00 +0000
+++ src/oopstools/oops/templates/500.html	2012-07-20 16:45:44 +0000
@@ -0,0 +1,5 @@
+{% extends "error.html" %}
+
+{% block title %}500{% endblock %}
+
+{% block description %}An internal server error occurred.{% endblock %}

=== added file 'src/oopstools/oops/templates/error.html'
--- src/oopstools/oops/templates/error.html	1970-01-01 00:00:00 +0000
+++ src/oopstools/oops/templates/error.html	2012-07-20 16:45:44 +0000
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <title>Error</title>
+    <style type="text/css" media="screen">
+      @import url("/oops/static/oops.css");
+    </style>
+  </head>
+  <body>
+    <h1>{% block title %}{% endblock %}!</h1>
+    <p>{% block description %}An unknown error occurred.{% endblock %}</p>
+  </body>
+</html>