public function buildMessage(Request $request, Response $response, Throwable $err = null): string
    {
        $base = 'Error occurred while dispatching request';
        if ($err === null) {
            return $base;
        }

        return sprintf('%s:%s%s', $base, PHP_EOL, $err);
    }