Tackeo de errores
This commit is contained in:
@@ -86,14 +86,28 @@ async def consume_ws_get_cove(**kwargs):
|
||||
|
||||
# Enviar documento
|
||||
_file_name = f"vu_COVE_{pedimento_app}_{cove}.xml"
|
||||
document_response = await coves_rest_controller.post_document(
|
||||
soap_response=soap_response,
|
||||
organizacion=kwargs.get('pedimento').get('organizacion'),
|
||||
pedimento=kwargs.get('pedimento').get('id'),
|
||||
file_name=_file_name,
|
||||
document_type=8,
|
||||
)
|
||||
|
||||
try:
|
||||
if soap_error(soap_response):
|
||||
document_response = await coves_rest_controller.post_document(
|
||||
soap_response=soap_response,
|
||||
organizacion=kwargs.get('pedimento').get('organizacion'),
|
||||
pedimento=kwargs.get('pedimento').get('id'),
|
||||
file_name=f"vu_COVE_{pedimento_app}_{cove}_ERROR.xml",
|
||||
document_type=10,
|
||||
)
|
||||
raise Exception("Error en la respuesta del servicio SOAP")
|
||||
else:
|
||||
document_response = await coves_rest_controller.post_document(
|
||||
soap_response=soap_response,
|
||||
organizacion=kwargs.get('pedimento').get('organizacion'),
|
||||
pedimento=kwargs.get('pedimento').get('id'),
|
||||
file_name=_file_name,
|
||||
document_type=8,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Error detectado en la respuesta SOAP: {str(e)}")
|
||||
raise Exception(f"Error en la respuesta SOAP: {str(e)}")
|
||||
|
||||
logger.info("Documento enviado, actualizando status de COVE")
|
||||
|
||||
# Actualizar status del COVE
|
||||
|
||||
Reference in New Issue
Block a user