mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Failure logging for network printing is now more explicit (also prints what the operation was)
This commit is contained in:
parent
8d7b813318
commit
6deaf5bd65
1 changed files with 11 additions and 1 deletions
|
@ -1025,7 +1025,17 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
if status_code in [200, 201, 202, 204]:
|
||||
pass # Request was successful!
|
||||
else:
|
||||
Logger.log("d", "Something went wrong when trying to update data of API (%s). Message: %s Statuscode: %s", reply_url, reply.readAll(), status_code)
|
||||
operation_type = "Unknown"
|
||||
if reply.operation() == QNetworkAccessManager.GetOperation:
|
||||
operation_type = "Get"
|
||||
elif reply.operation() == QNetworkAccessManager.PutOperation:
|
||||
operation_type = "Put"
|
||||
elif reply.operation() == QNetworkAccessManager.PostOperation:
|
||||
operation_type = "Post"
|
||||
elif reply.operation() == QNetworkAccessManager.DeleteOperation:
|
||||
operation_type = "Delete"
|
||||
|
||||
Logger.log("d", "Something went wrong when trying to update data of API (%s). Message: %s Statuscode: %s, operation: %s", reply_url, reply.readAll(), status_code, operation_type)
|
||||
else:
|
||||
Logger.log("d", "NetworkPrinterOutputDevice got an unhandled operation %s", reply.operation())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue