diff --git a/frontend/src/app/actions.tsx b/frontend/src/app/actions.tsx index c847b07..739660b 100644 --- a/frontend/src/app/actions.tsx +++ b/frontend/src/app/actions.tsx @@ -6,6 +6,8 @@ export async function getAlbums() { headers: { "Content-Type": "application/json" }, }).then(response => { return response.json(); + }).catch(error => { + console.error(error); }); } @@ -15,6 +17,8 @@ export async function getAlbum(id: number) { headers: { "Content-Type": "application/json" }, }).then(response => { return response.json(); + }).catch(error => { + console.error(error); }); } @@ -32,6 +36,8 @@ export async function createAlbum(formData: FormData) { }) }).then(response => { return response.json(); + }).catch(error => { + console.error(error); }); } @@ -53,6 +59,8 @@ export async function updateAlbum(formData: FormData) { }).then(response => { console.log(response.json()); return response.json(); + }).catch(error => { + console.error(error); }); } @@ -65,6 +73,8 @@ export async function deleteAlbum(id: number) { }) }).then(response => { return response.json(); + }).catch(error => { + console.error(error); }); } @@ -74,6 +84,8 @@ export async function getSongs() { headers: { "Content-Type": "application/json" }, }).then(response => { return response.json(); + }).catch(error => { + console.error(error); }); } @@ -83,6 +95,8 @@ export async function getSong(id: number) { headers: { "Content-Type": "application/json" }, }).then(response => { return response.json(); + }).catch(error => { + console.error(error); }); } @@ -102,6 +116,8 @@ export async function createSong(formData: FormData) { }) }).then(response => { return response.json(); + }).catch(error => { + console.error(error); }); } @@ -123,6 +139,8 @@ export async function updateSong(formData: FormData) { }) }).then(response => { return response.json(); + }).catch(error => { + console.error(error); }); } @@ -132,5 +150,7 @@ export async function deleteSong(id: number) { headers: { "Content-Type": "application/json" } }).then(response => { return response.json(); + }).catch(error => { + console.error(error); }); }