Failed to load resource: the server responded with a status of 500. React + Springboot (on Heroku)

Здраствуйте, у меня возникла ошибка при get запросе Код с spring-а:

@GetMapping("/patients/comments/{id}/{text}/{data}")
public void setPatientComment(@PathVariable Long id, @PathVariable String text, @PathVariable 
String data) {

    patientService.setPatientComment(text, data, id);
}

Код с React:

saveComment(patientID, commentText, commentData) {
    axios.get(`${url}/patients/comments/${patientID}/${commentText}/${commentData}`)
        .catch((error) => {
            console.error(error);
        })
        .then(() => {
            // always executed
        });
}

Скрин ошибки с локалки npm start:

введите сюда описание изображения

Скриншот с Postman:

введите сюда описание изображения

CORS был добавлен. Если нужна дополнительная информация пишите, буду благодарен любой помощи Ссылка на репозиторий: https://github.com/theShaper-I/vitechBackend


Ответы (1 шт):

Автор решения: Artemij

Неправильное название БД в запросе

@Query(value = "insert into comments (text, data, patient_id) VALUES (:text, :data, :id)", nativeQuery = true) void setPatientComment(@Param("text") String text, @Param("data") String data, @Param("id") Long id);

→ Ссылка