src/RequestApplication.php
public function handleRequest()
    {
        //Wait for static application initialization
        $staticInitPromise = !Reaction::$app->initialized ? Reaction::$app->initPromise : Reaction\Promise\resolve(true);
        return $staticInitPromise
            //Load Request app components
            ->then(function() {
                return $this->loadComponents();
            //Try to resolve request action
            })->then(function() {
                return $this->resolveAction();
            //Handle exceptions
            })->otherwise(function($exception) {
                if (Reaction::isConsoleApp() && $exception instanceof Reaction\Exceptions\Http\NotFoundException) {
                    $exception = new Reaction\Console\UnknownCommandException($this->reqHelper->getUrl(), $this, $exception->getCode(), $exception);
                }
                return $this->errorHandler->handleException($exception);
            //Emit EVENT_REQUEST_END event
            })->always(function() {
                return $this->emitAndWait(static::EVENT_REQUEST_END, [$this]);
            });
    }
public function handleRequest()
    {
        //Wait for static application initialization
        $staticInitPromise = !Reaction::$app->initialized ? Reaction::$app->initPromise : Reaction\Promise\resolve(true);
        return $staticInitPromise
            //Load Request app components
            ->then(function() {
                return $this->loadComponents();
            //Try to resolve request action
            })->then(function() {
                return $this->resolveAction();
            //Handle exceptions
            })->otherwise(function($exception) {
                if (Reaction::isConsoleApp() && $exception instanceof Reaction\Exceptions\Http\NotFoundException) {
                    $exception = new Reaction\Console\UnknownCommandException($this->reqHelper->getUrl(), $this, $exception->getCode(), $exception);
                }
                return $this->errorHandler->handleException($exception);
            //Emit EVENT_REQUEST_END event
            })->always(function() {
                return $this->emitAndWait(static::EVENT_REQUEST_END, [$this]);
            });
    }
Handle incoming request
@return ExtendedPromiseInterface