dwyl/hapi-error

View on GitHub

Showing 3 of 3 total issues

Function register has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  register: async function (server, options) {
    // creates config for handler to be used in 'onPreResponse' function
    var config = createConfig(options);

    // make handleError available on request
Severity: Major
Found in lib/index.js - About 2 hrs to fix

    Avoid too many return statements within this function.
    Open

              return reply.view(config.templateName, res).code(statusCode); // e.g 401
    Severity: Major
    Found in lib/index.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return reply.continue; // continue processing the request
      Severity: Major
      Found in lib/index.js - About 30 mins to fix
        Severity
        Category
        Status
        Source
        Language