about summary refs log tree commit diff
path: root/app/lib/webfinger.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/webfinger.rb')
-rw-r--r--app/lib/webfinger.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/lib/webfinger.rb b/app/lib/webfinger.rb
index b2374c494..c7aa43bb3 100644
--- a/app/lib/webfinger.rb
+++ b/app/lib/webfinger.rb
@@ -2,6 +2,8 @@
 
 class Webfinger
   class Error < StandardError; end
+  class GoneError < Error; end
+  class RedirectError < StandardError; end
 
   class Response
     def initialize(body)
@@ -47,6 +49,8 @@ class Webfinger
         res.body_with_limit
       elsif res.code == 404 && use_fallback
         body_from_host_meta
+      elsif res.code == 410
+        raise Webfinger::GoneError, "#{@uri} is gone from the server"
       else
         raise Webfinger::Error, "Request for #{@uri} returned HTTP #{res.code}"
       end