Improve printservant error handling

master
radex 2024-02-07 17:48:12 +01:00
parent 70f257ee06
commit f5eee8f824
Signed by: radex
SSH Key Fingerprint: SHA256:hvqRXAGG1h89yqnS+cyFTLKQbzjWD4uXIqw7Y+0ws30
1 changed files with 3 additions and 0 deletions

View File

@ -95,6 +95,9 @@ def stuff_print(size):
headers={'Content-Type': 'image/png'},
)
print('Printing job response', response)
if response.status_code != 200:
return flask.Response(f"{response.text} ({response.status_code})", status=response.status_code)
return 'ok'
def main():