File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed 
{{cookiecutter.project_slug}}/backend/app/app/api/api_v1/endpoints Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def create_user(
4040    user  =  crud .user .get_by_email (db , email = user_in .email )
4141    if  user :
4242        raise  HTTPException (
43-             status_code = 400 ,
43+             status_code = 409 ,
4444            detail = "The user with this username already exists in the system." ,
4545        )
4646    user  =  crud .user .create (db , obj_in = user_in )
@@ -105,7 +105,7 @@ def create_user_open(
105105    user  =  crud .user .get_by_email (db , email = email )
106106    if  user :
107107        raise  HTTPException (
108-             status_code = 400 ,
108+             status_code = 409 ,
109109            detail = "The user with this username already exists in the system" ,
110110        )
111111    user_in  =  schemas .UserCreate (password = password , email = email , full_name = full_name )
@@ -127,7 +127,7 @@ def read_user_by_id(
127127        return  user 
128128    if  not  crud .user .is_superuser (current_user ):
129129        raise  HTTPException (
130-             status_code = 400 , detail = "The user doesn't have enough privileges" 
130+             status_code = 401 , detail = "The user doesn't have enough privileges" 
131131        )
132132    return  user 
133133
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments