protected function toResponse(ApiProblem $problem) : ResponseInterface
    {
        $status = $problem->getStatus() ?: 500;

        $response = $this->responseFactory->createResponse($status);

        return $response;
    }