better error handling for not found resource, gitolite error
This commit is contained in:
parent
9e6d0710e9
commit
7d279f9302
9 changed files with 73 additions and 7 deletions
|
@ -36,7 +36,7 @@ class MergeRequestsController < ApplicationController
|
|||
def show
|
||||
unless @project.repo.heads.map(&:name).include?(@merge_request.target_branch) &&
|
||||
@project.repo.heads.map(&:name).include?(@merge_request.source_branch)
|
||||
head(404)and return
|
||||
git_not_found! and return
|
||||
end
|
||||
|
||||
@notes = @merge_request.notes.inc_author.order("created_at DESC").limit(20)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue