Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Erro na hora de realizar o GET

Aparece o seguinte erro:

(node:7344) UnhandledPromiseRejectionWarning: Error: write EPROTO 9868:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:

    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16)
(node:7344) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing 
inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:7344) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Estou rodando o npm start e o arquivo de servicos normalmente.

segue o código de busca por id

    buscaPorID(id, res) //para buscar por 1 atendimento em específico.
    {
        const sql =`SELECT * FROM Atendimentos WHERE ID= ${id}`

        conexao.query (sql, async (erro, resultados) =>
        {
            const atendimento = resultados [0]
            const cpf = atendimento.cliente
            if (erro)
            {
                res.status(400).json(erro);
            }
            else
            {
                const { data } = await axios.get (`https://localhost:8082/${cpf}`) //Para realizar a busca do cpf na nossa API criada

                atendimento.cliente = data;

                res.status(200).json(atendimento);
            }
        })
1 resposta
solução!

Erro resolvido.