|
|
@ -70,7 +70,7 @@ defmodule Explorer.Token.InstanceMetadataRetriever do |
|
|
|
fetch_json(%{"tokenURI" => {:ok, [decoded_json]}}) |
|
|
|
fetch_json(%{"tokenURI" => {:ok, [decoded_json]}}) |
|
|
|
rescue |
|
|
|
rescue |
|
|
|
e -> |
|
|
|
e -> |
|
|
|
Logger.error(["Unknown metadata format #{inspect(json)}. error #{inspect(e)}"], |
|
|
|
Logger.debug(["Unknown metadata format #{inspect(json)}. error #{inspect(e)}"], |
|
|
|
fetcher: :token_instances |
|
|
|
fetcher: :token_instances |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -83,7 +83,7 @@ defmodule Explorer.Token.InstanceMetadataRetriever do |
|
|
|
{:ok, %{metadata: json}} |
|
|
|
{:ok, %{metadata: json}} |
|
|
|
rescue |
|
|
|
rescue |
|
|
|
e -> |
|
|
|
e -> |
|
|
|
Logger.error(["Unknown metadata format #{inspect(json)}. error #{inspect(e)}"], |
|
|
|
Logger.debug(["Unknown metadata format #{inspect(json)}. error #{inspect(e)}"], |
|
|
|
fetcher: :token_instances |
|
|
|
fetcher: :token_instances |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -91,7 +91,7 @@ defmodule Explorer.Token.InstanceMetadataRetriever do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def fetch_json(result) do |
|
|
|
def fetch_json(result) do |
|
|
|
Logger.error(["Unknown metadata format #{inspect(result)}."], fetcher: :token_instances) |
|
|
|
Logger.debug(["Unknown metadata format #{inspect(result)}."], fetcher: :token_instances) |
|
|
|
|
|
|
|
|
|
|
|
{:error, result} |
|
|
|
{:error, result} |
|
|
|
end |
|
|
|
end |
|
|
@ -111,7 +111,7 @@ defmodule Explorer.Token.InstanceMetadataRetriever do |
|
|
|
end |
|
|
|
end |
|
|
|
rescue |
|
|
|
rescue |
|
|
|
e -> |
|
|
|
e -> |
|
|
|
Logger.error(["Could not send request to token uri #{inspect(token_uri)}. error #{inspect(e)}"], |
|
|
|
Logger.debug(["Could not send request to token uri #{inspect(token_uri)}. error #{inspect(e)}"], |
|
|
|
fetcher: :token_instances |
|
|
|
fetcher: :token_instances |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|