How to print the catch message, console, jquery?

0

I have the following function:

 function agregarCatalogos(idPedido, CodigoInventario, Cantidad) {
             myApp.showIndicator();
            return new Promise((res, rej) => {
                axios({
                    method: 'POST',
                    url: 'https://url/api/AppUpdateProductoCatalogo?IDPedido=${parseInt(idPedido)}&CodigoInventario=${CodigoInventario}&Cod_Agencia=${cod_agencia}&Cantidad=${parseInt(Cantidad)}',
                    headers: {
                        Authorization: token_type + " " + access_token
                    }
                })
                .then(function (response) {
                    console.log(response);
                    //$('.catalogos_disponibles').remove();
                    //$('.catalogos_disponibles').remove();
                    pedidoProforma(idPedido, tipo_envio, cod_agencia, cod_depto, producto_gratis,equipo_socionuevo, cod_cliente);
                    myApp.hideIndicator();
                }).catch(function (Error) {
                   console.log(Error);
                    myApp.alert("Es un Catálogo por cada compra llave que realices; no puedes seleccionar más");
                    el_product_quantity.text(parseInt(el_product_quantity.text())-1);
                    myApp.hideIndicator();
                })
            })
    }

This function gives me the following message as if it were an error. That message in the image should show the catch, but I do not know how to print it in the console.

Thank you very much in advance.

    
asked by JG_GJ 16.10.2018 в 01:04
source

0 answers