Closed modersohn closed 2 years ago
Possibly show an icon next to the animation url with a "!" or something and attach a tooltip to it? https://mudblazor.com/components/tooltip#simple-tooltips
It's all getting way more complicated than anticipated and since the 2nd fix will no longer cause the first fix to show up, I'm documenting it here before the PR is ready:
NftMetadata.Error?
that is shown on the details page as an alert if non-null (see below)GetContentTypeFromURL
we're only getting the header, so the error message is actually not there yet!response.IsSuccessful
I'll do another full request with a much shorter timeout (1s) to get the actual contentNewtonsoft.JSON
seems to handle those gracefully by default0x3a9841c0666ee92f4e96ed30ee186239134ce400521d1aca01d5ab714b42e0ec
works just fine in lexplorer, but is broken on the official explorerView MetaData
shows a correct JSON because we regenerate it for formatting/metadata.json
to the path
0x4baf35a6982a81402fbe5882a47a75add97a01cc69fc418b5fc545026751f08a
NftMetadataService.GetMetadata
relied on GetMetadataFromResponse
return nullNftMetaData.JSONContent
and NftMetaData.Error
contained the JSON version error.NftMetaData.Error
and if NftMetaData.JSONContent
actually contains "metadata.json".MakeIPFSLink
Uri
can't do all the work for us, as it only escapes the "data" portion0x3a9841c0666ee92f4e96ed30ee186239134ce400521d1aca01d5ab714b42e0ec
!Uri.IsWellFormedUriString
Another interesting test-case - which is not affected by the PR, i.e. it still looks the same:
nftID 0x32d1a78a05f19de4b36a6baed507278828869e7a6279ca6fa95a530ed7456d3e
which shows the HTML page the IPFs returns when the URL is a CID root:
Just had someone ask why their NFT wasn't showing, suspecting it was due to the size (290mb?).
0xe7a3e0d58759e2d619aa9162b6a6fbea0566139239253dd5425a035e663f986a
Upon further inspection, it's actually a minting error due to the # char in the filename. While we call
NftMetadataService.GetContentTypeFromURL
we actually get an error response in plain-text:It would be nice if we could show this error somehow somwhere to help people figure out what's wrong.