Estou com um erro quando tento cadastrar uma agencia no postman, ao executar a URL http://localhost:8080/agencias passando no corpo o json:
{
"nome": "Agencia BSB - Sobradinho I",
"razaoSocial": "Sobradinho AGENCIA BSB",
"cnpj": "15130254000100",
"endereco": {
"rua": "Quadra 8",
"logradouro": "Conjunto D",
"complemento": "Lote 60",
"numero": 21
}
}
o erro:
2024-12-16 11:34:18,737 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /agencias failed, error id: 5dcf165e-4858-4167-b9e9-97821fcde7e1-1: org.jboss.resteasy.reactive.ClientWebApplicationException: Received: 'Internal Server Error, status code 500' when invoking REST Client method: 'br.com.alura.service.http.SituacaoCadastralHttpService#buscarPorCnpj'
at org.jboss.resteasy.reactive.client.impl.RestClientRequestContext.unwrapException(RestClientRequestContext.java:205)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.handleException(AbstractResteasyReactiveContext.java:329)
...
Caused by: jakarta.ws.rs.WebApplicationException: Internal Server Error, status code 500
at br.com.alura.service.AgenciaService.cadastrar(AgenciaService.java:26)
at br.com.alura.service.AgenciaService_ClientProxy.cadastrar(Unknown Source)
at br.com.alura.controller.AgenciaController.cadastrar(AgenciaController.java:31)
at br.com.alura.controller.AgenciaController_Subclass.cadastrar$$superforward(Unknown Source)
at br.com.alura.controller.AgenciaController_Subclass$$function$$2.apply(Unknown Source)
...
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:635)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
... 2 more