5xx error status code for gitolite & encoding error

This commit is contained in:
randx 2012-09-07 20:47:52 +03:00
parent e8f39a0a61
commit 367e17cc84
2 changed files with 5 additions and 7 deletions

View file

@ -11,11 +11,11 @@ class ApplicationController < ActionController::Base
helper_method :abilities, :can?
rescue_from Gitlab::Gitolite::AccessDenied do |exception|
render "errors/gitolite", layout: "error"
render "errors/gitolite", layout: "error", status: 500
end
rescue_from Encoding::CompatibilityError do |exception|
render "errors/encoding", layout: "error", status: 404
render "errors/encoding", layout: "error", status: 500
end
rescue_from ActiveRecord::RecordNotFound do |exception|

View file

@ -1,5 +1,3 @@
.alert-message.block-message.error
%h3 Encoding Error
%hr
%p
Page can't be loaded because of an encoding error.
%h1 Encoding Error
%hr
%p Page can't be loaded because of an encoding error.