File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,6 @@ def request_post_mortem(self, response=None):
88
88
89
89
# import pudb; pudb.set_trace()
90
90
91
- if 'code' in response_json or 'message' in response_json :
92
- reason = " - " .join ([
93
- str (response_json .get (key )) for key in ['code' , 'message' , 'data' ] \
94
- if key in response_json
95
- ])
96
-
97
91
request_body = {}
98
92
request_url = ""
99
93
if hasattr (response , 'request' ):
@@ -102,6 +96,16 @@ def request_post_mortem(self, response=None):
102
96
if hasattr (response .request , 'body' ):
103
97
request_body = response .request .body
104
98
99
+ if 'code' in response_json or 'message' in response_json :
100
+ reason = " - " .join ([
101
+ str (response_json .get (key )) for key in ['code' , 'message' , 'data' ] \
102
+ if key in response_json
103
+ ])
104
+
105
+ if 'code' == 'rest_user_invalid_email' :
106
+ remedy = "Try checking the email %s doesn't already exist" % \
107
+ request_body .get ('email' )
108
+
105
109
response_headers = {}
106
110
if hasattr (response , 'headers' ):
107
111
response_headers = response .headers
You can’t perform that action at this time.
0 commit comments