From 7edd18d564537ef0aa9fa1db81f8ee56ebdd7dae Mon Sep 17 00:00:00 2001 From: thedriftofwords Date: Fri, 8 Mar 2024 12:49:51 -0500 Subject: [PATCH] Fix an error code --- public/samples/Automation/StreamsWithError.sol | 2 +- .../guides/streams-lookup-error-handler.mdx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/samples/Automation/StreamsWithError.sol b/public/samples/Automation/StreamsWithError.sol index a7837446efb..8c31b4ca4bd 100644 --- a/public/samples/Automation/StreamsWithError.sol +++ b/public/samples/Automation/StreamsWithError.sol @@ -123,7 +123,7 @@ contract StreamsLookupChainlinkAutomation is bool success = false; bool isError = true; // Add custom logic to handle errors offchain here - if (errorCode == 800400) { + if (errorCode == 808400) { // Bad request error code _upkeepNeeded = false; } else { diff --git a/src/content/chainlink-automation/guides/streams-lookup-error-handler.mdx b/src/content/chainlink-automation/guides/streams-lookup-error-handler.mdx index 87a337a3c1f..2b160e68cfd 100644 --- a/src/content/chainlink-automation/guides/streams-lookup-error-handler.mdx +++ b/src/content/chainlink-automation/guides/streams-lookup-error-handler.mdx @@ -49,7 +49,7 @@ If the Automation network fails to get the requested reports, an error code is s bool _upkeepNeeded = true; bool success = false; bool isError = true; - if (errorCode == 800400) { + if (errorCode == 808400) { // Handle bad request error code offchain _upkeepNeeded = false; } else { @@ -100,7 +100,7 @@ If the Automation network fails to get the requested reports, an error code is s If you need to force errors in StreamsLookup while testing, you can try the following methods: -- Specifying an incorrect `feedID` to force error code 800400 (`ErrCodeStreamsBadRequest`) +- Specifying an incorrect `feedID` to force error code 808400 (`ErrCodeStreamsBadRequest`) - Specifying a future timestamp to force error code 808206 (where partial content is received) for both single `feedID` and bulk `feedID` requests - Specifying old timestamps for reports not available anymore yields either error code 808504 (no response) or 808600 (bad response), depending on which service calls the timeout request @@ -123,7 +123,7 @@ If your [StreamsLookup revert](/chainlink-automation/reference/automation-interf No error - ErrCodeStreamsBadRequest: 800400 + ErrCodeStreamsBadRequest: 808400 No User requested 0 feeds