File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1+ CTL: ` schema load `  return a proper error message when authentication is missing or when the user doesn't have the permission to update the schema.
Original file line number Diff line number Diff line change @@ -539,10 +539,12 @@ def _validate_load_schema_response(response: httpx.Response) -> SchemaLoadRespon
539539            status  =  response .json ()
540540            return  SchemaLoadResponse (hash = status ["hash" ], previous_hash = status ["previous_hash" ])
541541
542-         if  response .status_code  ==  httpx .codes .BAD_REQUEST :
543-             return  SchemaLoadResponse (errors = response .json ())
544- 
545-         if  response .status_code  ==  httpx .codes .UNPROCESSABLE_ENTITY :
542+         if  response .status_code  in  [
543+             httpx .codes .BAD_REQUEST ,
544+             httpx .codes .UNPROCESSABLE_ENTITY ,
545+             httpx .codes .UNAUTHORIZED ,
546+             httpx .codes .FORBIDDEN ,
547+         ]:
546548            return  SchemaLoadResponse (errors = response .json ())
547549
548550        response .raise_for_status ()
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments