gitosis error handle
This commit is contained in:
parent
d7ea9052f1
commit
ec9e54ea94
7 changed files with 50 additions and 8 deletions
|
@ -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|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue