@ -507,7 +507,7 @@ defmodule Explorer.Token.MetadataRetriever do
if error =~ " execution reverted " or error =~ @vm_execution_error do
if error =~ " execution reverted " or error =~ @vm_execution_error do
{ :error , @vm_execution_error }
{ :error , @vm_execution_error }
else
else
Logger . warn ( [ " Unknown metadata format error #{ inspect ( error ) } . " ] , fetcher : :token_instances )
Logger . warning ( [ " Unknown metadata format error #{ inspect ( error ) } . " ] , fetcher : :token_instances )
# truncate error since it will be stored in DB
# truncate error since it will be stored in DB
{ :error , truncate_error ( error ) }
{ :error , truncate_error ( error ) }
@ -520,7 +520,7 @@ defmodule Explorer.Token.MetadataRetriever do
ipfs? = true
ipfs? = true
fetch_json_from_uri ( { :ok , [ ipfs_link ( result ) ] } , ipfs? , token_id , hex_token_id , from_base_uri? )
fetch_json_from_uri ( { :ok , [ ipfs_link ( result ) ] } , ipfs? , token_id , hex_token_id , from_base_uri? )
else
else
Logger . warn ( [ " Unknown metadata format result #{ inspect ( result ) } . " ] , fetcher : :token_instances )
Logger . warning ( [ " Unknown metadata format result #{ inspect ( result ) } . " ] , fetcher : :token_instances )
{ :error , truncate_error ( result ) }
{ :error , truncate_error ( result ) }
end
end
@ -575,7 +575,7 @@ defmodule Explorer.Token.MetadataRetriever do
end
end
rescue
rescue
e ->
e ->
Logger . warn (
Logger . warning (
[
[
" Unknown metadata format base64 #{ inspect ( base64_encoded_json ) } . " ,
" Unknown metadata format base64 #{ inspect ( base64_encoded_json ) } . " ,
Exception . format ( :error , e , __STACKTRACE__ )
Exception . format ( :error , e , __STACKTRACE__ )
@ -604,7 +604,7 @@ defmodule Explorer.Token.MetadataRetriever do
check_type ( json , hex_token_id )
check_type ( json , hex_token_id )
rescue
rescue
e ->
e ->
Logger . warn ( [ " Unknown metadata format #{ inspect ( json ) } . " , Exception . format ( :error , e , __STACKTRACE__ ) ] ,
Logger . warning ( [ " Unknown metadata format #{ inspect ( json ) } . " , Exception . format ( :error , e , __STACKTRACE__ ) ] ,
fetcher : :token_instances
fetcher : :token_instances
)
)
@ -612,7 +612,7 @@ defmodule Explorer.Token.MetadataRetriever do
end
end
defp fetch_json_from_uri ( uri , _ipfs? , _token_id , _hex_token_id , _from_base_uri? ) do
defp fetch_json_from_uri ( uri , _ipfs? , _token_id , _hex_token_id , _from_base_uri? ) do
Logger . warn ( [ " Unknown metadata uri format #{ inspect ( uri ) } . " ] , fetcher : :token_instances )
Logger . warning ( [ " Unknown metadata uri format #{ inspect ( uri ) } . " ] , fetcher : :token_instances )
{ :error , " unknown metadata uri format " }
{ :error , " unknown metadata uri format " }
end
end
@ -623,7 +623,7 @@ defmodule Explorer.Token.MetadataRetriever do
fetch_json_from_uri ( { :ok , [ decoded_json ] } , ipfs? , token_id , hex_token_id , from_base_uri? )
fetch_json_from_uri ( { :ok , [ decoded_json ] } , ipfs? , token_id , hex_token_id , from_base_uri? )
rescue
rescue
e ->
e ->
Logger . warn ( [ " Unknown metadata format #{ inspect ( json ) } . " , Exception . format ( :error , e , __STACKTRACE__ ) ] ,
Logger . warning ( [ " Unknown metadata format #{ inspect ( json ) } . " , Exception . format ( :error , e , __STACKTRACE__ ) ] ,
fetcher : :token_instances
fetcher : :token_instances
)
)
@ -643,7 +643,7 @@ defmodule Explorer.Token.MetadataRetriever do
fetch_metadata_from_uri ( prepared_uri , ipfs? , hex_token_id )
fetch_metadata_from_uri ( prepared_uri , ipfs? , hex_token_id )
rescue
rescue
e ->
e ->
Logger . warn (
Logger . warning (
[ " Could not prepare token uri #{ inspect ( uri ) } . " , Exception . format ( :error , e , __STACKTRACE__ ) ] ,
[ " Could not prepare token uri #{ inspect ( uri ) } . " , Exception . format ( :error , e , __STACKTRACE__ ) ] ,
fetcher : :token_instances
fetcher : :token_instances
)
)
@ -683,7 +683,7 @@ defmodule Explorer.Token.MetadataRetriever do
{ :error_code , code }
{ :error_code , code }
{ :error , % Error { reason : reason } } ->
{ :error , % Error { reason : reason } } ->
Logger . warn (
Logger . warning (
[ " Request to token uri failed: #{ inspect ( uri ) } . " , inspect ( reason ) ] ,
[ " Request to token uri failed: #{ inspect ( uri ) } . " , inspect ( reason ) ] ,
fetcher : :token_instances
fetcher : :token_instances
)
)
@ -692,7 +692,7 @@ defmodule Explorer.Token.MetadataRetriever do
end
end
rescue
rescue
e ->
e ->
Logger . warn (
Logger . warning (
[ " Could not send request to token uri #{ inspect ( uri ) } . " , Exception . format ( :error , e , __STACKTRACE__ ) ] ,
[ " Could not send request to token uri #{ inspect ( uri ) } . " , Exception . format ( :error , e , __STACKTRACE__ ) ] ,
fetcher : :token_instances
fetcher : :token_instances
)
)