The protocol attempts to provide a custom error for nonexistent token metadata queries.
However, ownerOf(tokenId) already reverts internally for nonexistent tokens before the custom error condition can execute.
As a result, the custom error ERC721Metadata__URI_QueryFor_NonExistentToken() is never actually triggered.
Likelihood:
Every invalid token query reaches ownerOf() first.
Impact:
Intended custom error handling is bypassed.
Error behavior becomes inconsistent with developer expectations.
The following test demonstrates that the custom error is never emitted.
Use _ownerOf() or _exists() instead of ownerOf() for existence checks.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.