Improved error handling for FollowRemoteService
This commit is contained in:
parent
8c0b19012b
commit
0e9c1a297a
3 changed files with 29 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue