1+ # ------------------------------------------------------------------------------
2+ # Copyright (c) 2019 Parallax Inc. -
3+ # -
4+ # Permission is hereby granted, free of charge, to any person obtaining -
5+ # a copy of this software and associated documentation files (the -
6+ # “Software”), to deal in the Software without restriction, including -
7+ # without limitation the rights to use, copy, modify, merge, publish, -
8+ # distribute, sublicense, and/or sell copies of the Software, and to -
9+ # permit persons to whom the Software is furnished to do so, subject -
10+ # to the following conditions: -
11+ # -
12+ # The above copyright notice and this permission notice shall be -
13+ # included in all copies or substantial portions of the Software. -
14+ # -
15+ # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, -
16+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -
17+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. -
18+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -
19+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -
20+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -
21+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -
22+ # -
23+ # -
24+ # ------------------------------------------------------------------------------
25+
126import logging
227'''
328Failure messages
@@ -36,7 +61,7 @@ def unknown_user_id(id_user):
3661 'message' : 'Unknown user' ,
3762 'code' : 400 ,
3863 'data' : id_user
39- }, 400
64+ }, 404
4065
4166
4267def unknown_user_email (email ):
@@ -46,7 +71,7 @@ def unknown_user_email(email):
4671 'message' : 'Unknown user' ,
4772 'code' : 400 ,
4873 'data' : email
49- }, 400
74+ }, 404
5075
5176
5277def unknown_user_screen_name (screen_name ):
@@ -56,7 +81,7 @@ def unknown_user_screen_name(screen_name):
5681 'message' : 'Unknown user screen name' ,
5782 'code' : 400 ,
5883 'data' : screen_name
59- }, 400
84+ }, 404
6085
6186
6287def email_already_in_use (email ):
0 commit comments