From df60d96c4dfe0fdcd12f84e0ae6af2af1daa8eae Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 4 Feb 2014 21:06:59 -0800 Subject: [PATCH] e.getStatusCode() was throwing an error Expired certs were never getting to login() as it was throwing an error. I think it's due to sandbox restrictions. --- nest.devicetype.groovy | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nest.devicetype.groovy b/nest.devicetype.groovy index 4c21891..c44e8fd 100644 --- a/nest.devicetype.groovy +++ b/nest.devicetype.groovy @@ -275,9 +275,7 @@ def doRequest(uri, args, type, success) { httpGet(params, success) } } catch (Throwable e) { - if(e.getStatusCode() == 401) { - login() - } + login() } }