How to use the @hapi/boom.notImplemented function in @hapi/boom

To help you get started, we’ve selected a few @hapi/boom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mark-bradshaw / mrhorse / lib / index.js View on Github external
aggregateApplyPoint = determineAggregateApplyPoint(routePolicy);

                if (aggregateApplyPoint === applyPoint) {
                    routePolicy = exports.parallel.apply(this, routePolicy);
                }
                else {
                    routePolicy = null;
                }
            }

            if (typeof routePolicy === 'string') {

                // Look for missing policies.  Probably due to misspelling.
                if (data.names.indexOf(routePolicy) === -1) {
                    throw Boom.notImplemented('Missing policy: ' + routePolicy);
                }

                if (applyPointPolicies[routePolicy]) {
                    tmpList.push(applyPointPolicies[routePolicy]);
                }

            }
            else if (typeof routePolicy === 'function') {

                // If an aggregate apply point wasn't already determined
                // but an aggregate apply point seems like it will be used, determine it from `policy.runs`.
                // `policy.runs` is an array of loaded policies reported by an aggregate policy
                // such as MrHorse.parallel, specifically for determining
                // its apply point ad hoc, notably here in the extension handler.
                if (!aggregateApplyPoint && routePolicy.runs) {
                    aggregateApplyPoint = determineAggregateApplyPoint(routePolicy.runs);
github bakjs / bak / packages / auth / lib / provider / base.js View on Github external
async validatePassword (user, password) {
    throw Boom.notImplemented('validatePassword not implemented')
  }
github bakjs / bak / packages / auth / lib / provider / base.js View on Github external
oauthLogin (client_id) {
    throw Boom.notImplemented('oauthLogin not implemented')
  }
github bakjs / bak / packages / auth / lib / provider / base.js View on Github external
findByUsername (username) {
    throw Boom.notImplemented('findByUsername not implemented')
  }
github bakjs / bak / packages / auth / lib / provider / base.js View on Github external
getToken (user, request, client) {
    throw Boom.notImplemented('getToken not implemented')
  }
github bakjs / bak / packages / auth / lib / provider / base.js View on Github external
oauthAuthorize (client_id, request) {
    throw Boom.notImplemented('oauthAuthorize not implemented')
  }
}
github bakjs / bak / packages / auth / lib / provider / base.js View on Github external
authToken (token) {
    throw Boom.notImplemented('authToken not implemented')
  }
github ipfs / js-ipfs / src / http / api / routes / debug.js View on Github external
async handler (request, h) {
    if (!process.env.IPFS_MONITORING) {
      throw Boom.notImplemented('Monitoring is disabled. Enable it by setting environment variable IPFS_MONITORING')
    }

    const { ipfs } = request.server.app
    const peers = await ipfs.swarm.peers()

    gauge.set(peers.length)

    return h.response(client.register.metrics())
      .type(client.register.contentType)
  }
}
github bakjs / bak / packages / auth / lib / provider / base.js View on Github external
login ({ username, password, request }) {
    throw Boom.notImplemented('login not implemented')
  }
github bakjs / bak / packages / auth / lib / provider / base.js View on Github external
logout ({ user, session, request }) {
    throw Boom.notImplemented('logout not implemented')
  }