Skip to content

Commit

Permalink
Merge pull request #575 from oceanprotocol/issue-754-root-no-rpcs
Browse files Browse the repository at this point in the history
fix root endpoint, without RPCS
  • Loading branch information
paulo-ocean authored Aug 1, 2024
2 parents 1c4bd0b + fbb5bd9 commit 586cf44
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/httpRoutes/rootEndpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ export const rootEndpointRoutes = express.Router()
rootEndpointRoutes.get('/', async (req, res) => {
const config = await getConfiguration()
if (!config.supportedNetworks) {
HTTP_LOGGER.error(`Supported networks not defined`)
res.status(400).send(`Supported networks not defined`)
HTTP_LOGGER.warn(`Supported networks not defined`)
}
res.json({
chainIds: Object.keys(config.supportedNetworks),
chainIds: config.supportedNetworks ? Object.keys(config.supportedNetworks) : [],
providerAddress: config.keys.ethAddress,
serviceEndpoints: getAllServiceEndpoints(),
software: 'Ocean-Node',
Expand Down

0 comments on commit 586cf44

Please sign in to comment.