Enhance logging and error handling in FalukantService and FamilyView
- Added detailed logging for partner search and creation processes in FalukantService to improve traceability and debugging. - Refactored the partner search logic to use a dynamic where clause for better readability and maintainability. - Implemented error handling in FamilyView's loadGifts method to ensure an empty array is returned on API errors, enhancing user experience.
This commit is contained in:
@@ -295,8 +295,13 @@ export default {
|
||||
},
|
||||
|
||||
async loadGifts() {
|
||||
const response = await apiClient.get('/api/falukant/family/gifts');
|
||||
this.gifts = response.data;
|
||||
try {
|
||||
const response = await apiClient.get('/api/falukant/family/gifts');
|
||||
this.gifts = response.data || [];
|
||||
} catch (error) {
|
||||
console.error('Error loading gifts:', error);
|
||||
this.gifts = []; // Leeres Array bei Fehler
|
||||
}
|
||||
},
|
||||
|
||||
async sendGift() {
|
||||
|
||||
Reference in New Issue
Block a user