diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/cli.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -47,7 +47,9 @@ class OgREST(): r = requests.post(f'{self.URL}{path}', headers=self.HEADERS, json=payload) - print(r.text) + if r.text: + print(r.text) + if r.status_code not in {200, 202}: sys.exit(f"Unsuccessful request to ogServer: " f"Response with {r.status_code} HTTP status code") |