I am try to call an API but when I send isRestart : true, I get 500 internal server error and when I send the same data with **isRestart: false **, I get a response and status 200, so its working fine on false statement but its giving me 500 error on true statement. any ideas what might be causing it ?
const resetExam = () => {
const resetExamData = {
studentId: student_id,
studentType: student_type,
isRestart: true,
};
axios
.post(`https://myapiurl.net/api/getExamList`, resetExamData)
.then((response) => {
console.log(response.data.data);
})
.catch((error) => {
console.log(error, "Error Loading Reset APi, Please Try Again !");
});
};
Note : message : "Creating default object from empty value" // This is what it says in the developer console network tab.