resource-watch/widget

View on GitHub
app/src/app.js

Summary

Maintainability
B
5 hrs
Test Coverage
B
82%

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

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

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

            async function onDbReady(err) {
                if (err) {
                    if (retries >= 0) {
                        retries -= 1;
                        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