diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-07-20 01:59:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 01:59:07 +0200 |
commit | 1fcdaafa6fbe6d746a096c33263d76e6819da46d (patch) | |
tree | f12319e574997bea52eb6074e35e84addcfa78fa /app/controllers/api | |
parent | f24b81e27f1c6290cc6f43a71a32200a08c47d1c (diff) |
Fix webfinger retries (#4275)
* Do not raise unretryable exceptions in ResolveRemoteAccountService * Removed fatal exceptions from ResolveRemoteAccountService Exceptions that cannot be retried should not be raised. New exception class for those that can be retried (Mastodon::UnexpectedResponseError)
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/base_controller.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb index c1b2ec3cf..105a2859d 100644 --- a/app/controllers/api/base_controller.rb +++ b/app/controllers/api/base_controller.rb @@ -17,11 +17,7 @@ class Api::BaseController < 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 + rescue_from HTTP::Error, Mastodon::UnexpectedResponseError do render json: { error: 'Remote data could not be fetched' }, status: 503 end |