Skip to content

Commit

Permalink
Adding extra logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiehewitt15 committed Aug 1, 2024
1 parent 9103b95 commit 564639c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Indexer/crawlerThread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ async function retryCrawlerWithDelay(
return retryCrawlerWithDelay(blockchain, retryInterval)
}
} catch (err) {
INDEXER_LOGGER.error(`Error starting crawler: ${err.message}`)
return false
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/components/httpRoutes/logs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import express from 'express'
import { validateAdminSignature } from '../../utils/auth.js'
import { HTTP_LOGGER } from '../../utils/logging/common.js'

export const logRoutes = express.Router()

Expand Down Expand Up @@ -61,6 +62,7 @@ logRoutes.post('/logs', express.json(), validateRequest, async (req, res) => {
res.status(404).send('No logs found')
}
} catch (error) {
HTTP_LOGGER.error(`Error retrieving logs: ${error.message}`)
res.status(500).send(`Internal Server Error: ${error.message}`)
}
})
Expand All @@ -75,6 +77,7 @@ logRoutes.post('/log/:id', express.json(), validateRequest, async (req, res) =>
res.status(404).send('Log not found')
}
} catch (error) {
HTTP_LOGGER.error(`Error retrieving log: ${error.message}`)
res.status(500).send('Internal Server Error' + error.message)
}
})

0 comments on commit 564639c

Please sign in to comment.