fix: adjust raise condition and install server in ci

This commit is contained in:
drbh 2024-07-02 15:42:20 +00:00
parent a1c92bd0d6
commit aaa899139b
2 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,10 @@ jobs:
echo text-generation-launcher --help
python update_doc.py md --check
- name: Install
run: |
make install-cpu
- name: Check that openapi schema is up-to-date
run: |
python update_doc.py openapi --check

View File

@ -237,12 +237,16 @@ def openapi(check: bool):
except TimeoutError as e:
print(f"Error: {e}")
raise SystemExit(1)
except requests.RequestException as e:
print(f"Error communicating with the server: {e}")
raise SystemExit(1)
except json.JSONDecodeError:
print("Error: Invalid JSON received from the server")
raise SystemExit(1)
except Exception as e:
print(f"An unexpected error occurred: {e}")
raise SystemExit(1)
if __name__ == "__main__":