Catching more exceptions that slipped through, removing AR logging from
production as it's very verbose and not very useful
This commit is contained in:
parent
b078885414
commit
fe77921e47
7 changed files with 29 additions and 6 deletions
|
@ -18,6 +18,10 @@ class ApiController < ApplicationController
|
|||
render json: { error: 'Remote data could not be fetched' }, status: 503
|
||||
end
|
||||
|
||||
rescue_from OpenSSL::SSL::SSLError do
|
||||
render json: { error: 'Remote SSL certificate could not be verified' }, status: 503
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def current_resource_owner
|
||||
|
|
|
@ -30,6 +30,12 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
def gone
|
||||
respond_to do |format|
|
||||
format.any { head 410 }
|
||||
end
|
||||
end
|
||||
|
||||
def current_account
|
||||
current_user.try(:account)
|
||||
end
|
||||
|
|
|
@ -8,13 +8,16 @@ class StreamEntriesController < ApplicationController
|
|||
def show
|
||||
@type = @stream_entry.activity_type.downcase
|
||||
|
||||
if @stream_entry.activity_type == 'Status'
|
||||
@ancestors = @stream_entry.activity.ancestors
|
||||
@descendants = @stream_entry.activity.descendants
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.html do
|
||||
return gone if @stream_entry.activity.nil?
|
||||
|
||||
if @stream_entry.activity_type == 'Status'
|
||||
@ancestors = @stream_entry.activity.ancestors
|
||||
@descendants = @stream_entry.activity.descendants
|
||||
end
|
||||
end
|
||||
|
||||
format.atom
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue