The GetWeather.js script used by Chainlink Functions expects a valid combination of pincode and isoCode to fetch geolocation data from the OpenWeatherMap API.
If a user provides an invalid or non-existent combination, the API call fails, causing the script to throw an error. As a result, the oracle fulfillment fails, and the user cannot mint the NFT, even though they paid the minting fee.
Likelihood:
This will occur whenever a user enters an invalid or unsupported pincode/isoCode combination.
Users may make mistakes or typos, or may attempt to mint for locations not supported by the API.
Impact:
Users lose their minting fee and receive no NFT.
A user submits an invalid pincode/isoCode, causing GetWeather.js to throw an error and preventing NFT minting even user paid for it.
Add input validation in the smart contract to check for obviously invalid pincodes or isoCodes before sending the request.
In GetWeather.js, handle API errors gracefully and return a specific error code or message that can be surfaced to the user.
Refunding the minting fee or allowing the user to retry with corrected input if the oracle request fails.
This is informational. It is user's responsibility to provide correct input arguments. If the user provides incorrect arguments, it will lead to incorrect results, lost funds or failed transaction.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.