You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contentstack/errors.py
+18-23Lines changed: 18 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -23,30 +23,29 @@
23
23
*
24
24
"""
25
25
26
-
27
26
importlogging
28
27
28
+
29
29
classHTTPError(Exception):
30
-
31
30
errors_str= {
32
-
33
-
'error_invalid_json': "Please provide valid JSON.",
34
-
'error_message_stack_api_key_is_null': "Stack api key can not be null.",
35
-
'error_form_name': "Please set contentType name.",
36
-
'error_stack_access_token_is_null': "Access token can not be null.",
37
-
'error_stack_environment_is_null': "Environment can not be null.",
38
-
'Error_Connection_Error': "Connection error",
39
-
'Error_Auth_Failure_Error': "Authentication Not present.",
40
-
'Error_Parse_Error': "Parsing Error.",
41
-
'Error_Server_Error': "Server interaction went wrong, Please try again.",
42
-
'Error_Default': "Oops! Something went wrong. Please try again.",
43
-
'Error_No_Network': "Network not available.",
44
-
'Error_Called_Default_Method': "You must called Contentstack.stack() first",
45
-
'Error_Query_Filter_Exception': "Please provide valid params."
31
+
32
+
'error_invalid_json': "Please provide valid JSON.",
33
+
'error_message_stack_api_key_is_null': "Stack api key can not be null.",
34
+
'error_form_name': "Please set contentType name.",
35
+
'error_stack_access_token_is_null': "Access token can not be null.",
36
+
'error_stack_environment_is_null': "Environment can not be null.",
37
+
'Error_Connection_Error': "Connection error",
38
+
'Error_Auth_Failure_Error': "Authentication Not present.",
39
+
'Error_Parse_Error': "Parsing Error.",
40
+
'Error_Server_Error': "Server interaction went wrong, Please try again.",
41
+
'Error_Default': "Oops! Something went wrong. Please try again.",
42
+
'Error_No_Network': "Network not available.",
43
+
'Error_Called_Default_Method': "You must called Contentstack.stack() first",
44
+
'Error_Query_Filter_Exception': "Please provide valid params."
46
45
}
47
46
48
-
def__init__(self):
49
47
48
+
def__init__(self):
50
49
errors= {
51
50
52
51
400: "The request was incorrect or corrupted.",
@@ -61,17 +60,13 @@ def __init__(self):
61
60
504: "A server did not receive a timely response from another server that it was accessing while attempting to load the web page or fill another request by the browser."
0 commit comments