gfw-api/gfw-geostore-api

View on GitHub
app/src/app.js

Summary

Maintainability
B
5 hrs
Test Coverage
D
68%

Function init has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function init() {
    return new Promise((resolve, reject) => {
        async function onDbReady(mongoConnectionError) {
            if (mongoConnectionError) {
                if (retries >= 0) {
Severity: Major
Found in app/src/app.js - About 2 hrs to fix

    Function onDbReady has 64 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            async function onDbReady(mongoConnectionError) {
                if (mongoConnectionError) {
                    if (retries >= 0) {
                        retries--;
                        logger.error(`Failed to connect to MongoDB uri ${mongoUri}, retrying...`);
    Severity: Major
    Found in app/src/app.js - About 2 hrs to fix

      There are no issues that match your filters.

      Category
      Status