about summary refs log tree commit diff
path: root/app/lib/request.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-07-10 18:59:28 +0200
committerGitHub <noreply@github.com>2019-07-10 18:59:28 +0200
commit5d3feed191bcbe2769512119752b426108152fe9 (patch)
treeb36bc69823e5a16250bb9f72d388498737d6725a /app/lib/request.rb
parentd04c584159fdad36d7713718c4ba0b3b42cd27a9 (diff)
Refactor fetching of remote resources (#11251)
Diffstat (limited to 'app/lib/request.rb')
-rw-r--r--app/lib/request.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/request.rb b/app/lib/request.rb
index 322457ad7..1fd3f5190 100644
--- a/app/lib/request.rb
+++ b/app/lib/request.rb
@@ -41,7 +41,7 @@ class Request
   end
 
   def on_behalf_of(account, key_id_format = :acct, sign_with: nil)
-    raise ArgumentError unless account.local?
+    raise ArgumentError, 'account must be local' unless account&.local?
 
     @account       = account
     @keypair       = sign_with.present? ? OpenSSL::PKey::RSA.new(sign_with) : @account.keypair