Estou revendo o código, mas ainda não descobri onde estou errando. Quando faço alteração no postman, aparece a mensagem: Error while sending request, somente aceitando o formato json. Erro do terminal:
ValorNaoSuportado: O tipo de conteúdo application/xml não é suportado at SerializadorErro.serializar (C:\Users\joaoz\Desktop\ALURA\api-petshop\api\Serializador.js:25:15) at C:\Users\joaoz\Desktop\ALURA\api-petshop\api\index.js:57:18 at Layer.handle_error (C:\Users\joaoz\Desktop\ALURA\api-petshop\node_modules\express\lib\router\layer.js:71:5) at trim_prefix (C:\Users\joaoz\Desktop\ALURA\api-petshop\node_modules\express\lib\router\index.js:315:13) at C:\Users\joaoz\Desktop\ALURA\api-petshop\node_modules\express\lib\router\index.js:284:7 at Function.process_params (C:\Users\joaoz\Desktop\ALURA\api-petshop\node_modules\express\lib\router\index.js:335:12) at next (C:\Users\joaoz\Desktop\ALURA\api-petshop\node_modules\express\lib\router\index.js:275:10) at C:\Users\joaoz\Desktop\ALURA\api-petshop\node_modules\express\lib\router\index.js:635:15 at next (C:\Users\joaoz\Desktop\ALURA\api-petshop\node_modules\express\lib\router\index.js:260:14) at next (C:\Users\joaoz\Desktop\ALURA\api-petshop\node_modules\express\lib\router\route.js:127:14)
Se alguém puder ajudar, agradeço muito.