From: masarakki Date: Sun, 7 May 2017 17:00:40 +0000 (+0900) Subject: raise-when-oembed-not-found (#2882) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=267ed3d74b17f9f535d434ea2979521b91d08174;p=mastodon.git raise-when-oembed-not-found (#2882) --- diff --git a/app/lib/provider_discovery.rb b/app/lib/provider_discovery.rb index abd98f3aa..3d0712a5c 100644 --- a/app/lib/provider_discovery.rb +++ b/app/lib/provider_discovery.rb @@ -22,6 +22,7 @@ class ProviderDiscovery < OEmbed::ProviderDiscovery format ||= :xml if provider_endpoint end + raise OEmbed::NotFound, url if provider_endpoint.nil? begin provider_endpoint = Addressable::URI.parse(provider_endpoint) provider_endpoint.query = nil