Skip to content

Commit

Permalink
Add comment explaing catch + reraise (#5782)
Browse files Browse the repository at this point in the history
  • Loading branch information
citizen428 authored and mstruve committed Jan 28, 2020
1 parent 1a8ca3a commit 96ac213
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/comments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ def create
else
render json: { status: "errors" }
end
# See https://github.com/thepracticaldev/dev.to/pull/5485#discussion_r366056925
# for details as to why this is necessary
rescue Pundit::NotAuthorizedError
raise
rescue StandardError => e
Expand Down

0 comments on commit 96ac213

Please sign in to comment.