parent
49d5c68600
commit
5fa0aebe9f
14 changed files with 88 additions and 38 deletions
8
app/assets/stylesheets/errors.scss
Normal file
8
app/assets/stylesheets/errors.scss
Normal file
|
@ -0,0 +1,8 @@
|
|||
.logo {
|
||||
float: left;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.details {
|
||||
float: left;
|
||||
}
|
15
app/controllers/errors_controller.rb
Normal file
15
app/controllers/errors_controller.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class ErrorsController < ApplicationController
|
||||
layout "error"
|
||||
|
||||
def forbidden
|
||||
render :status => :forbidden
|
||||
end
|
||||
|
||||
def not_found
|
||||
render :status => :not_found
|
||||
end
|
||||
|
||||
def internal_server_error
|
||||
render :status => :internal_server_error
|
||||
end
|
||||
end
|
3
app/views/errors/forbidden.html.erb
Normal file
3
app/views/errors/forbidden.html.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<h1>Forbidden</h1>
|
||||
<p>The operation you requested on the OpenStreetMap server is only available to administrators (HTTP 403)</p>
|
||||
<p>Feel free to <a href="http://wiki.openstreetmap.org/wiki/Contact" title="Various contact channels explained">contact</a> the OpenStreetMap community if you have found a broken link / bug. Make a note of the exact URL of your request.</p>
|
4
app/views/errors/internal_server_error.html.erb
Normal file
4
app/views/errors/internal_server_error.html.erb
Normal file
|
@ -0,0 +1,4 @@
|
|||
<h1>Application error</h1>
|
||||
<p>The OpenStreetMap server encountered an unexpected condition that prevented it from fulfilling the request (HTTP 500)</p>
|
||||
<p>Feel free to <a href="http://wiki.openstreetmap.org/wiki/Contact" title="Various contact channels explained">contact</a> the OpenStreetMap community if your problem persists. Make a note of the exact URL / post data of your request.</p>
|
||||
<p>This may be a problem in our Ruby On Rails code. 500 occurs with exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code)</p>
|
3
app/views/errors/not_found.html.erb
Normal file
3
app/views/errors/not_found.html.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<h1>File not found</h1>
|
||||
<p>Couldn't find a file/directory/API operation by that name on the OpenStreetMap server (HTTP 404)</p>
|
||||
<p>Feel free to <a href="http://wiki.openstreetmap.org/wiki/Contact" title="Various contact channels explained">contact</a> the OpenStreetMap community if you have found a broken link / bug. Make a note of the exact URL of your request.</p>
|
14
app/views/layouts/error.html.erb
Normal file
14
app/views/layouts/error.html.erb
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>OpenStreetMap</title>
|
||||
<%= stylesheet_link_tag "errors", :media=> "screen" %>
|
||||
</head>
|
||||
<body>
|
||||
<%= image_tag "osm_logo.png", :class => "logo" %>
|
||||
<div class="details">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue