Repository: uclapi/uclapi

Issue:
Vague "contact support" error messages should note who and where support is
Error messages such as "User does not exist. This should never occur. Please contact support." exist and should probably instead say "Please email isd.apiteam@ucl.ac.uk" or something along those lines, or raise an issue on github etc...


Discussion:

Resolving patch:
diff --git a/backend/uclapi/oauth/views.py b/backend/uclapi/oauth/views.py
--- a/backend/uclapi/oauth/views.py
+++ b/backend/uclapi/oauth/views.py
@@ -280,7 +280,8 @@ def userdeny(request):
             "ok": False,
             "error": ("The signed data received was invalid."
                       " Please try the login process again. "
-                      "If this issue persists, please contact support.")
+                      "If this issue persists, please contact us at "
+                      "isd.apiteam@ucl.ac.uk or on github.")
         })
         response.status_code = 400
         return response
@@ -291,7 +292,8 @@ def userdeny(request):
         response = PrettyJsonResponse({
             "ok": False,
             "error": ("The JSON data was not in the expected format."
-                      " Please contact support.")
+                      " Please contact us at "
+                      "isd.apiteam@ucl.ac.uk or on github.")
         })
         response.status_code = 400
         return response
@@ -313,7 +315,8 @@ def userdeny(request):
             "ok": False,
             "error":
                 "User does not exist. This should never occur. "
-                "Please contact support."
+                "Please contact us at "
+                "isd.apiteam@ucl.ac.uk or on github."
         })
         response.status_code = 400
         return response
@@ -339,7 +342,8 @@ def userallow(request):
             "ok": False,
             "error": ("The signed data received was invalid."
                       " Please try the login process again."
-                      " If this issue persists, please contact support.")
+                      " If this issue persists, please contact us at"
+                      " isd.apiteam@ucl.ac.uk or on github.")
         })
         response.status_code = 400
         return response
@@ -350,7 +354,8 @@ def userallow(request):
         response = PrettyJsonResponse({
             "ok": False,
             "error": ("The JSON data was not in the expected format."
-                      " Please contact support.")
+                      " Please contact us at"
+                      " isd.apiteam@ucl.ac.uk or on github.")
         })
         response.status_code = 400
         return response


Test patch:
diff --git a/backend/uclapi/oauth/tests.py b/backend/uclapi/oauth/tests.py
--- a/backend/uclapi/oauth/tests.py
+++ b/backend/uclapi/oauth/tests.py
@@ -768,7 +768,8 @@ def test_userallow_no_post_data(self):
                          ("The signed data received "
                           "was invalid."
                           " Please try the login process again."
-                          " If this issue persists, please contact support."))
+                          " If this issue persists, please contact us at "
+                          "isd.apiteam@ucl.ac.uk or on github."))
 
     def test_userallow_bad_but_signed_post_data(self):
         signer = signing.TimestampSigner()
@@ -782,7 +783,8 @@ def test_userallow_bad_but_signed_post_data(self):
         self.assertEqual(response.status_code, 400)
         self.assertEqual(response.json()["error"],
                          ("The JSON data was not in the expected format. "
-                          "Please contact support."))
+                          "Please contact us at "
+                          "isd.apiteam@ucl.ac.uk or on github."))
 
     def test_userdeny_no_post_data(self):
         response = self.client.get(
@@ -794,7 +796,8 @@ def test_userdeny_no_post_data(self):
                          ("The signed data received "
                           "was invalid."
                           " Please try the login process again."
-                          " If this issue persists, please contact support."))
+                          " If this issue persists, please contact us at "
+                          "isd.apiteam@ucl.ac.uk or on github."))
 
     def test_userdeny_bad_but_signed_post_data(self):
         signer = signing.TimestampSigner()
@@ -808,7 +811,8 @@ def test_userdeny_bad_but_signed_post_data(self):
         self.assertEqual(response.status_code, 400)
         self.assertEqual(response.json()["error"],
                          ("The JSON data was not in the expected format. "
-                          "Please contact support."))
+                          "Please contact us at "
+                          "isd.apiteam@ucl.ac.uk or on github."))
 
     def test_userdeny_user_does_not_exist(self):
         dev_user_ = User.objects.create(
@@ -848,7 +852,8 @@ def test_userdeny_user_does_not_exist(self):
         self.assertEqual(response.status_code, 400)
         self.assertEqual(response.json()["error"],
                          ("User does not exist. This should never occur. "
-                          "Please contact support."))
+                          "Please contact us at "
+                          "isd.apiteam@ucl.ac.uk or on github."))
 
     def test_userdeny_good_flow(self):
         dev_user_ = User.objects.create(