MCPcopy
hub / github.com/hapijs/hapi / _invoke

Method _invoke

lib/request.js:406–433  ·  view source on GitHub ↗
(event, options = {})

Source from the content-addressed store, hash-verified

404 }
405
406 async _invoke(event, options = {}) {
407
408 for (const ext of event.nodes) {
409 const realm = ext.realm;
410 const bind = ext.bind ?? realm.settings.bind;
411 const response = await this._core.toolkit.execute(ext.func, this, { bind, realm, timeout: ext.timeout, name: event.type, ignoreResponse: options.ignoreResponse });
412
413 if (options.ignoreResponse) {
414 if (Boom.isBoom(response)) {
415 this._log(['ext', 'error'], response);
416 }
417
418 continue;
419 }
420
421 if (response === Toolkit.symbols.continue) {
422 continue;
423 }
424
425 if (internals.skip(response) ||
426 this.response === null) {
427
428 return response;
429 }
430
431 this._setResponse(response);
432 }
433 }
434
435 async _reply(exit) {
436

Callers 4

_onRequestMethod · 0.45
_lifecycleMethod · 0.45
_postCycleMethod · 0.45
_finalizeMethod · 0.45

Calls 3

executeMethod · 0.80
_setResponseMethod · 0.80
_logMethod · 0.45

Tested by

no test coverage detected