From 367e17cc84bd432117f283d2e858a29d033e979f Mon Sep 17 00:00:00 2001 From: randx Date: Fri, 7 Sep 2012 20:47:52 +0300 Subject: [PATCH] 5xx error status code for gitolite & encoding error --- app/controllers/application_controller.rb | 4 ++-- app/views/errors/encoding.html.haml | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2fe2a97460f..a0040298a15 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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| diff --git a/app/views/errors/encoding.html.haml b/app/views/errors/encoding.html.haml index 4662437f2d2..d7b5e68e870 100644 --- a/app/views/errors/encoding.html.haml +++ b/app/views/errors/encoding.html.haml @@ -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.