@bytebrand/export-cars 1.22.17 → 1.22.18

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/export-cars",
3
- "version": "1.22.17",
3
+ "version": "1.22.18",
4
4
  "description": "",
5
5
  "author": "bytebrand",
6
6
  "license": "UNLICENSED",
@@ -21,8 +21,16 @@ export class UserService {
21
21
  return cachedResponse;
22
22
  }
23
23
 
24
- const defaultSummary = await CronicleUtils.retry(() => this.requestService.userActionsRequest.getDefaultSummaryByDealerId(dealerId), 1, 30, true);
25
- const result = get(defaultSummary, 'data.schema', {});
24
+ let result: any = {};
25
+ try {
26
+ const defaultSummary = await CronicleUtils.retry(() => this.requestService.userActionsRequest.getDefaultSummaryByDealerId(dealerId), 1, 30, true);
27
+ result = get(defaultSummary, 'data.schema', {});
28
+ } catch (e) {
29
+ // Dealer has no default summary template (user-actions returns 404) — fall back to an
30
+ // empty schema instead of letting the rejection crash the whole export job.
31
+ // Mirrors car-platform-sync UserActionsService.getDefaultSummaryByDealerId behaviour.
32
+ console.log('getDefaultSummaryByDealerId', dealerId, get(e, 'message', e));
33
+ }
26
34
  await this.cacheManager.set(cacheKey, result);
27
35
 
28
36
  return result;