gitosis error handle

This commit is contained in:
gitlabhq 2011-10-10 00:15:28 +03:00
parent d7ea9052f1
commit ec9e54ea94
7 changed files with 50 additions and 8 deletions

View file

@ -105,6 +105,8 @@ class ProjectsController < ApplicationController
format.json { render json: @project.errors, status: :unprocessable_entity }
end
end
rescue Gitosis::AccessDenied
render :js => "location.href = '#{errors_gitosis_path}'" and return
rescue StandardError => ex
@project.errors.add(:base, "Cant save project. Please try again later")
respond_to do |format|