From 994d948c3947b75140c2a2a7de5b81713c7b8ea3 Mon Sep 17 00:00:00 2001 From: Clworld Date: Thu, 27 Jul 2017 07:38:20 +0900 Subject: Add callback_url/acct information for Sidekiq PuSH workers Exception. (#4281) * Add destination informations to exception on SubscribeWorker and DeliveryWorker. * Simplify delivery error message. * Prevent changing Exception type... * fix typo. --- app/lib/exceptions.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/lib') diff --git a/app/lib/exceptions.rb b/app/lib/exceptions.rb index 34d84a34f..b2489711d 100644 --- a/app/lib/exceptions.rb +++ b/app/lib/exceptions.rb @@ -8,11 +8,11 @@ module Mastodon class UnexpectedResponseError < Error def initialize(response = nil) - @response = response - end - - def to_s - "#{@response.uri} returned code #{@response.code}" + if response.respond_to? :uri + super("#{response.uri} returned code #{response.code}") + else + super + end end end end -- cgit