# HttpSoft\Runner exceptions

The HttpSoft\Runner package exception classes.

# HttpSoft\Runner\Exception\EmptyMiddlewarePipelineException

If the instance that implements HttpSoft\Runner\MiddlewarePipelineInterface does not have middleware to handle the request, the HttpSoft\Runner\Exception\EmptyMiddlewarePipelineException exception will be thrown.

/** @var string $className class name that implements `HttpSoft\Runner\MiddlewarePipelineInterface` */
throw HttpSoft\Runner\Exception\EmptyMiddlewarePipelineException::create($className);

Source code on GitHub.

# HttpSoft\Runner\Exception\InvalidMiddlewareResolverHandlerException

If the handler is not valid, the HttpSoft\Runner\Exception\InvalidMiddlewareResolverHandlerException exception will be thrown.

/**
 * @var mixed $handler
 * @see `HttpSoft\Runner\MiddlewareResolverInterface::resolve()`
 */
throw HttpSoft\Runner\Exception\InvalidMiddlewareResolverHandlerException::create($handler);

If the callable handler does not return an instance of Psr\Http\Message\ResponseInterface, the HttpSoft\Runner\Exception\InvalidMiddlewareResolverHandlerException exception will be thrown.

/** @var mixed $response value returned by the callable handler */
throw HttpSoft\Runner\Exception\InvalidMiddlewareResolverHandlerException::forCallableMissingResponse($response);

If the string handler is not a class name or an identifier of a container definition, and does not return an instance of Psr\Http\Server\MiddlewareInterface or Psr\Http\Server\RequestHandlerInterface, the HttpSoft\Runner\Exception\InvalidMiddlewareResolverHandlerException exception will be thrown.

/** @var string $handler */
throw HttpSoft\Runner\Exception\InvalidMiddlewareResolverHandlerException::forStringNotConvertedToInstance($handler);

Source code on GitHub.