From 38d8eb7b97d28810102bb8fba41af4ee944ae245 Mon Sep 17 00:00:00 2001 From: masarakki Date: Mon, 8 May 2017 02:00:40 +0900 Subject: [PATCH] raise-when-oembed-not-found (#2882) --- app/lib/provider_discovery.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/lib/provider_discovery.rb b/app/lib/provider_discovery.rb index abd98f3aa6..3d0712a5ca 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