diff options
Diffstat (limited to 'app/lib/request.rb')
-rw-r--r-- | app/lib/request.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/lib/request.rb b/app/lib/request.rb index c84daaa69..7a8141c7e 100644 --- a/app/lib/request.rb +++ b/app/lib/request.rb @@ -33,8 +33,8 @@ class Request set_digest! if options.key?(:body) end - def on_behalf_of(account, key_id_format = :acct, sign_with: nil) - raise ArgumentError unless account.local? + def on_behalf_of(account, key_id_format = :uri, sign_with: nil) + raise ArgumentError, 'account must not be nil' if account.nil? @account = account @keypair = sign_with.present? ? OpenSSL::PKey::RSA.new(sign_with) : @account.keypair @@ -52,7 +52,7 @@ class Request begin response = http_client.headers(headers).public_send(@verb, @url.to_s, @options) rescue => e - raise e.class, "#{e.message} on #{@url}", e.backtrace[0] + raise e.class, "#{e.message} on #{@url}", e.backtrace end begin |