wineater-bot 4.5.11 → 4.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/App.svelte +2 -0
- package/src/services/api/api.ts +2 -2
package/package.json
CHANGED
package/src/App.svelte
CHANGED
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
try {
|
|
99
99
|
results = await wineaterApi.getInstantRecommendations();
|
|
100
100
|
} catch (error) {
|
|
101
|
+
console.error('[wineater] instant recommendations error:', error);
|
|
101
102
|
setSearchError();
|
|
102
103
|
} finally {
|
|
103
104
|
isLoading = false;
|
|
@@ -155,6 +156,7 @@
|
|
|
155
156
|
}
|
|
156
157
|
} catch (error) {
|
|
157
158
|
results = [];
|
|
159
|
+
console.error('[wineater] search error:', error);
|
|
158
160
|
trackWidgetEvent(WIDGET_EVENTS.ERROR_OCCURRED, storeId, {
|
|
159
161
|
error_message: error?.message,
|
|
160
162
|
query
|
package/src/services/api/api.ts
CHANGED
|
@@ -57,7 +57,7 @@ class WineaterApi {
|
|
|
57
57
|
throw new Error(`API call failed with status ${response.status}: ${data.message || 'No additional error information'}`);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
const deserializedData: Wine[] = data.map(deserializeInstantRecommendation);
|
|
60
|
+
const deserializedData: Wine[] = data.filter(Boolean).map(deserializeInstantRecommendation);
|
|
61
61
|
return deserializedData;
|
|
62
62
|
} catch (error) {
|
|
63
63
|
throw new Error(`Error in getInstantRecommendations: ${error.message}`);
|
|
@@ -81,7 +81,7 @@ class WineaterApi {
|
|
|
81
81
|
throw new Error(`API call failed with status ${response.status}: ${data.message || 'No additional error information'}`);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
const deserializedData: RecommendedWine[] = data.map(deserializeRecommendedWine);
|
|
84
|
+
const deserializedData: RecommendedWine[] = data.filter(Boolean).map(deserializeRecommendedWine);
|
|
85
85
|
return deserializedData;
|
|
86
86
|
} catch (error) {
|
|
87
87
|
throw new Error(`Error in getWineRecommendations: ${error.message}`);
|