diff --git a/api/handlers/node.ts b/api/handlers/node.ts index eaa0986..c7fada0 100644 --- a/api/handlers/node.ts +++ b/api/handlers/node.ts @@ -128,20 +128,8 @@ export default function configureNodeHandlers(apiRouter: Router) { badRequestResponse(res, 'No address provided'); return; } - - console.log('Executing operator-cli stake_info...'); const output = execFileSync('operator-cli', ['stake_info', address], { encoding: 'utf8' }) - - // Check for specific error message - // Case where query was valid but no stake info was found - if (output === 'No stake information found. Please fund the account and try again.') { - // Check if the response headers have already been sent - if (!res.headersSent) { - res.status(404).json({ errorMessage: 'Account not found. Please ensure the account has been funded.', errorDetails: '' }); - } - return; - } const yamlData = yaml.load(output); res.json(yamlData); }) diff --git a/hooks/fetcher.ts b/hooks/fetcher.ts index e38b464..8587405 100644 --- a/hooks/fetcher.ts +++ b/hooks/fetcher.ts @@ -35,8 +35,6 @@ export const fetcher = async (input: RequestInfo | URL, const data = await res.json(); if (res.status === 403) { authService.logout(apiBase); - } else if (input.toString().includes('account') && res.status === 404 && data.errorMessage === `Account not found. Please ensure the account has been funded.`) { - throw new Error('No stake information found. Please fund the account and try again.'); } else if (res.status === 500) { showErrorMessage('Sorry, something went wrong. Please report this issue to our support team so we can investigate and resolve the problem.'); return;