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 @@ -540,10 +540,12 @@ def _validate_load_schema_response(response: httpx.Response) -> SchemaLoadRespon
540540 status = response .json ()
541541 return SchemaLoadResponse (hash = status ["hash" ], previous_hash = status ["previous_hash" ])
542542
543- if response .status_code == httpx .codes .BAD_REQUEST :
544- return SchemaLoadResponse (errors = response .json ())
545-
546- if response .status_code == httpx .codes .UNPROCESSABLE_ENTITY :
543+ if response .status_code in [
544+ httpx .codes .BAD_REQUEST ,
545+ httpx .codes .UNPROCESSABLE_ENTITY ,
546+ httpx .codes .UNAUTHORIZED ,
547+ httpx .codes .FORBIDDEN ,
548+ ]:
547549 return SchemaLoadResponse (errors = response .json ())
548550
549551 response .raise_for_status ()
You can’t perform that action at this time.
0 commit comments