diff options
Diffstat (limited to 'internal/federation/authenticate.go')
-rw-r--r-- | internal/federation/authenticate.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/federation/authenticate.go b/internal/federation/authenticate.go index a966bb26a..32e427542 100644 --- a/internal/federation/authenticate.go +++ b/internal/federation/authenticate.go @@ -25,6 +25,7 @@ import ( "encoding/pem" "errors" "fmt" + "net/http" "net/url" "strings" @@ -226,7 +227,7 @@ func (f *federator) AuthenticateFederatedRequest(ctx context.Context, requestedU // The actual http call to the remote server is made right here in the Dereference function. b, err := trans.Dereference(ctx, requestingPublicKeyID) if err != nil { - if errors.Is(err, transport.ErrGone) { + if gtserror.StatusCode(err) == http.StatusGone { // if we get a 410 error it means the account that owns this public key has been deleted; // we should add a tombstone to our database so that we can avoid trying to deref it in future if err := f.HandleGone(ctx, requestingPublicKeyID); err != nil { |