Improved error handling for FollowRemoteService
This commit is contained in:
@ -10,6 +10,14 @@ class ApiController < ApplicationController
|
||||
render json: { error: 'Record not found' }, status: 404
|
||||
end
|
||||
|
||||
rescue_from Goldfinger::Error do
|
||||
render json: { error: 'Remote account could not be resolved' }, status: 422
|
||||
end
|
||||
|
||||
rescue_from HTTP::Error do
|
||||
render json: { error: 'Remote data could not be fetched' }, status: 503
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def current_resource_owner
|
||||
|
Reference in New Issue
Block a user