From 2793f403c3d6e791dcd0f7461c856c2ab4822748 Mon Sep 17 00:00:00 2001 From: Tamar Ben-Shachar Date: Wed, 10 Feb 2016 17:39:21 -0800 Subject: [PATCH] add a helpful message when a response returns a 403 --- dcos/http.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dcos/http.py b/dcos/http.py index f66af5c..1e7fa26 100644 --- a/dcos/http.py +++ b/dcos/http.py @@ -195,6 +195,8 @@ def request(method, if is_success(response.status_code): return response + elif response.status_code == 403: + raise DCOSException("You are not authorized to perform this operation") else: raise DCOSHTTPException(response)