The Chainlink documentation specifies that you should check that a request for a given _requestId exists before continuing.

Chainlink Docs

I'm curious to further understand why this is, is it wrong to assume that the Oracle should never attempt to fulfil a request that has never been instantiated? For reference, I have reviewed the best practices section of the documentation and all attached code snippets do not follow this behaviour.

Thanks :)

Whilst developing the contract I am working on, I noticed this and wanted to gain a better understanding as to why the documentation validates a given request exists before fulfilling it.

1 Answer 1


The reason why the documentation recommends checking that a request for a given _requestId exists before continuing is to ensure that the contract only processes valid requests that have been initiated by the contract owner and are part of the expected workflow.

This helps to prevent potential attacks or unexpected behavior, and ensures the contract operates as intended.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.