Não consigo fazer o agendamento da consulta, porque dá essa exception:
2023-05-16T11:14:15.661-03:00 ERROR 14400 --- [nio-8080-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.dao.InvalidDataAccessApiUsageException: Argument [1] of type [java.lang.Long] did not match parameter type [med.voll.api.domain.medico.Medico (n/a)]] with root cause
java.lang.IllegalArgumentException: Argument [1] of type [java.lang.Long] did not match parameter type [med.voll.api.domain.medico.Medico (n/a)]
Quando eu tento pelo modo sem inserir o id aparece essa outra exception:
2023-05-16T11:26:12.378-03:00 ERROR 14400 --- [nio-8080-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.dao.InvalidDataAccessApiUsageException: Parameter value [2023-10-10T10:00] did not match expected type [BasicSqmPathSource(id : Long) ]] with root cause
org.hibernate.type.descriptor.java.CoercionException: Cannot coerce value `2023-10-10T10:00` [java.time.LocalDateTime] as Long
at org.hibernate.type.descriptor.java.LongJavaType.coerce(LongJavaType.java:155) ~[hibernate-core-6.1.7.Final.jar:6.1.7.Final]
at org.hibernate.type.descriptor.java.LongJavaType.coerce(LongJavaType.java:24) ~[hibernate-core-6.1.7.Final.jar:6.1.7.Final]
Em ambas requisições o erro consta como 403 Forbidden, mesmo usando o token correto. Por que isso está acontecendo?