Recently we had someone setting up a webhook, but they were getting this error message posted in slack instead of the content:
Couldn't parse Looker response. The server may be offline.
The user that our lookerbot API Token didn't have access to the look, so when it tried to request the look I think it was getting a 404 response with an HTML body. I think this code tries to parse it as JSON, which understandably throws an exception which is caught, but has this error message, which isn't obvious that this is a resource not found/permissions issue. An additional response code check for 404 like this could probably deliver an error message that would make it more obvious that it's a permission issue.
Recently we had someone setting up a webhook, but they were getting this error message posted in slack instead of the content:
Couldn't parse Looker response. The server may be offline.The user that our lookerbot API Token didn't have access to the look, so when it tried to request the look I think it was getting a 404 response with an HTML body. I think this code tries to parse it as JSON, which understandably throws an exception which is caught, but has this error message, which isn't obvious that this is a resource not found/permissions issue. An additional response code check for 404 like this could probably deliver an error message that would make it more obvious that it's a permission issue.