Merhaba, anketimdeki soruyu silmek istediğimde console da aşağıdaki uyarıyı alıyorum. Sebebi ne olabilir
Kodlarım;
handleDelete(id: string) {
this.$confirm.require({
message: "Are you sure you want to proceed?",
header: "Confirmation",
icon: "pi pi-exclamation-triangle",
accept: () => {
deleteQuestionnairesQuestions(id)
.then((res: AxiosResponse<any>) => {
this.getQuestionnairesQuestions();
this.$toast.add({
severity: "info",
summary: "Confirmed",
detail: "Record deleted",
group: "tr",
life: 3000,
});
return Promise.resolve(res.data);
})
.catch((err: AxiosError) => {
return Promise.reject(err);
});
},
reject: () => {
this.$toast.add({
severity: "error",
summary: "Rejected",
detail: "You have rejected",
group: "tr",
life: 3000,
});
this.discard();
},
onHide: () => {
//Callback to execute when dialog is hidden
},
});
},
Servis;
export const deleteQuestionnairesQuestions = (id) => {
return apiClient.delete<AxiosResponse<any>>(
questionnaires-question/${id}/
,
generalAxiosConfig
);
};
Console daki mesaj;
:5173/admin/questionnaires-detail/36:1 Uncaught (in promise) AxiosError {message: 'Request failed with status code 404', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest, …}code: "ERR_BAD_REQUEST"config: {transitional: {…}, adapter: Array(2), transformRequest: Array(1), transformResponse: Array(1), timeout: 50000, …}message: "Request failed with status code 404"name: "AxiosError"request: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 50000, withCredentials: false, upload: XMLHttpRequestUpload, …}response: {data: '<!DOCTYPE html>\n<html lang="en">\n<head>\n <meta ht…dard 404 page.\n </p>\n </div>\n</body>\n</html>\n', status: 404, statusText: 'Not Found', headers: AxiosHeaders, config: {…}, …}stack: "AxiosError: Request failed with status code 404\n at settle (http://localhost:5173/node_modules/.vite/deps/axios.js?v=85cb0584:1120:12)\n at XMLHttpRequest.onloadend (http://localhost:5173/node_modules/.vite/deps/axios.js?v=85cb0584:1331:7)"[[Prototype]]: Error
XMLHttpRequest.send (async)
dispatchXhrRequest @ xhr.js:247
xhr @ xhr.js:49
dispatchRequest @ dispatchRequest.js:51
Promise.then (async)
request @ Axios.js:118
Axios.<computed> @ Axios.js:168
wrap @ bind.js:5
deleteQuestionnairesQuestions @ index.ts:37
accept @ QuestionnairesDetail.vue:311
accept @ confirmdialog.esm.js:55
createVNode.onClick.cache.<computed>.cache.<computed> @ confirmdialog.esm.js:158
callWithErrorHandling @ runtime-core.esm-bundler.js:157
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:166
invoker @ runtime-dom.esm-bundler.js:345