Commit 367e17cc84bd432117f283d2e858a29d033e979f

Authored by randx
1 parent e8f39a0a

5xx error status code for gitolite & encoding error

app/controllers/application_controller.rb
@@ -11,11 +11,11 @@ class ApplicationController < ActionController::Base @@ -11,11 +11,11 @@ class ApplicationController < ActionController::Base
11 helper_method :abilities, :can? 11 helper_method :abilities, :can?
12 12
13 rescue_from Gitlab::Gitolite::AccessDenied do |exception| 13 rescue_from Gitlab::Gitolite::AccessDenied do |exception|
14 - render "errors/gitolite", layout: "error" 14 + render "errors/gitolite", layout: "error", status: 500
15 end 15 end
16 16
17 rescue_from Encoding::CompatibilityError do |exception| 17 rescue_from Encoding::CompatibilityError do |exception|
18 - render "errors/encoding", layout: "error", status: 404 18 + render "errors/encoding", layout: "error", status: 500
19 end 19 end
20 20
21 rescue_from ActiveRecord::RecordNotFound do |exception| 21 rescue_from ActiveRecord::RecordNotFound do |exception|
app/views/errors/encoding.html.haml
1 -.alert-message.block-message.error  
2 - %h3 Encoding Error  
3 - %hr  
4 - %p  
5 - Page can't be loaded because of an encoding error. 1 +%h1 Encoding Error
  2 +%hr
  3 +%p Page can't be loaded because of an encoding error.