[tipfy] 2 new revisions pushed by rodrigo.moraes on 2011-03-27 19:40 GMT

0 views
Skip to first unread message

ti...@googlecode.com

unread,
Mar 27, 2011, 3:41:21 PM3/27/11
to tipfy-...@googlegroups.com
2 new revisions:

Revision: 59c938f07115
Author: Noah McIlraith
Date: Sun Mar 27 04:41:08 2011
Log: Modified app.yaml to avoid potentially erroneous default error
handler...
http://code.google.com/p/tipfy/source/detail?r=59c938f07115

Revision: daee2d774e6c
Author: Noah McIlraith
Date: Sun Mar 27 04:43:13 2011
Log: Removed redundant error page from /static
http://code.google.com/p/tipfy/source/detail?r=daee2d774e6c

==============================================================================
Revision: 59c938f07115
Author: Noah McIlraith
Date: Sun Mar 27 04:41:08 2011
Log: Modified app.yaml to avoid potentially erroneous default error
handler by moving the error pages, also added handling for more specific
errors (over_quota, dos_api_denial, timeout).

I'm still uncertain about placing the error pages under templates, as they
are not technically templates, but since placing them in /static may cause
errors (the irony!) /templates seems like the next best place to put them.
http://code.google.com/p/tipfy/source/detail?r=59c938f07115

Added:
/project/app/templates/error_handlers/default_error.html
/project/app/templates/error_handlers/dos_api_denial.html
/project/app/templates/error_handlers/over_quota.html
/project/app/templates/error_handlers/timeout.html
Modified:
/project/app/app.yaml

=======================================
--- /dev/null
+++ /project/app/templates/error_handlers/default_error.html Sun Mar 27
04:41:08 2011
@@ -0,0 +1,17 @@
+<html>
+ <head>
+ <title>Error</title>
+ <style>
+ h1 {
+ color: #666666;
+ text-align: center;
+ font-family: 'trebuchet ms', trebuchet, georgia, arial, sans-serif;
+ font-size: 36px;
+ margin-top: 144px;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>The server experienced an error while processing the request.</h1>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /project/app/templates/error_handlers/dos_api_denial.html Sun Mar 27
04:41:08 2011
@@ -0,0 +1,17 @@
+<html>
+ <head>
+ <title>Blocked</title>
+ <style>
+ h1 {
+ color: #666666;
+ text-align: center;
+ font-family: 'trebuchet ms', trebuchet, georgia, arial, sans-serif;
+ font-size: 36px;
+ margin-top: 144px;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>Blocked</h1>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /project/app/templates/error_handlers/over_quota.html Sun Mar 27
04:41:08 2011
@@ -0,0 +1,17 @@
+<html>
+ <head>
+ <title>Quota exhausted</title>
+ <style>
+ h1 {
+ color: #666666;
+ text-align: center;
+ font-family: 'trebuchet ms', trebuchet, georgia, arial, sans-serif;
+ font-size: 36px;
+ margin-top: 144px;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>The server is unable to process this request due to quota
exhaustion.</h1>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /project/app/templates/error_handlers/timeout.html Sun Mar 27 04:41:08
2011
@@ -0,0 +1,17 @@
+<html>
+ <head>
+ <title>Timeout</title>
+ <style>
+ h1 {
+ color: #666666;
+ text-align: center;
+ font-family: 'trebuchet ms', trebuchet, georgia, arial, sans-serif;
+ font-size: 36px;
+ margin-top: 144px;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>The server timed out while processing this request.</h1>
+ </body>
+</html>
=======================================
--- /project/app/app.yaml Tue Mar 8 04:31:50 2011
+++ /project/app/app.yaml Sun Mar 27 04:41:08 2011
@@ -3,8 +3,20 @@
runtime: python
api_version: 1

+inbound_services:
+- warmup
+
error_handlers:
- - file: static/default_error.html
+- file: templates/error_handlers/default_error.html
+
+- error_code: over_quota
+ file: templates/error_handlers/over_quota.html
+
+- error_code: dos_api_denial
+ file: templates/error_handlers/dos_api_denial.html
+
+- error_code: timeout
+ file: templates/error_handlers/timeout.html

builtins:
- appstats: on
@@ -12,9 +24,14 @@
- remote_api: on

handlers:
-- url: /(robots\.txt|favicon\.ico)
- static_files: static/\1
- upload: static/(.*)
+- url: /favicon\.ico
+ static_files: static/favicon.ico
+ upload: static/favicon.ico
+ mime_type: image/vnd.microsoft.icon
+
+- url: /robots\.txt
+ static_files: static/robots.txt
+ upload: static/robots.txt

- url: /static
static_dir: static

==============================================================================
Revision: daee2d774e6c
Author: Noah McIlraith
Date: Sun Mar 27 04:43:13 2011
Log: Removed redundant error page from /static
http://code.google.com/p/tipfy/source/detail?r=daee2d774e6c

Deleted:
/project/app/static/default_error.html

=======================================
--- /project/app/static/default_error.html Tue Mar 8 04:31:50 2011
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
- <head>
- <title>Error</title>
- <style>
- h1 {
- color: #666666;
- text-align: center;
- font-family: 'trebuchet ms', trebuchet, georgia, arial, sans-serif;
- font-size: 36px;
- margin-top: 144px;
- }
- </style>
- </head>
- <body>
- <h1>The server is down. Please try again later.</h1>
- </body>
-</html>

Reply all
Reply to author
Forward
0 new messages