in backend-printing/helper/backend_print.py [0:0]
def upload_document_to_universal_print(self, request_body):
"""Upload the document to the Universal Print using universal print client.
Args:
request_body (request): request body
Returns:
response object: response
"""
try:
UniversalPrintClient().upload_document(request_body)
self.logger.info(
f"[{self.log_tag}] Uploaded document to the universal print server"
)
except Exception as e:
self.logger.error(
f"[{self.log_tag}] Error occurred while uploading document to the universal print server: {e}"
)
return {
"status": "error",
"message": f"Error occurred while uploading the document to the UP Server {e}",
}