Help finguring out what wrong with this code

" OpenSprinkler : Error manually controlling valve Connection Issue" this only happen when resp in the code reads nill

if (resp == nil) then
return “ERROR”, nil, “Connection Issue”
end

local lul_base_cmd = http://192.168.15.130/cm?pw=a6d82bced638de3def1e9bbb4983225c&sid=0&en=1&t=1800

    if  lul_settings.NewModeTarget == "Disable" then
      lul_cmd = lul_base_cmd .. 'en=0'
    elseif lul_settings.NewModeTarget == "Enable" then
      lul_cmd = lul_base_cmd .. 'en=1'
    end

    local isOk, resp, err = os_http_call(lul_cmd)

    local taskHandle = TASK_HANDLE or -1

    if (isOk ~= "OK") then
      taskHandle = luup.task("Error enabling/disabling controller: " .. err, luupTaskReturns["Error"], MSG_CLASS, taskHandle)
    else
      taskHandle = luup.task("", luupTaskReturns["Success"], "", taskHandle)
      luup.variable_set("urn:fowler-cc:serviceId:OpenSprinkler1", "ModeStatus", lul_settings.NewModeTarget, lul_device)
    end

    if (TASK_HANDLE == nil) then
      TASK_HANDLE = taskHandle
    end

    debug("OpenSprinkler : SetModeTarget : Exit")
    return 4

the http response it

  1. Request Method:GET
  2. Status Code:200 OK

the html text on the page displays

{“result”:1}

the swithc responds but i keep getting

so for some reason its reading the response code as nill