@thorprovider/adapters 5.0.10 → 5.0.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.
Files changed (37) hide show
  1. package/AGENTS.md +1 -1
  2. package/dist/index.d.mts +376 -16
  3. package/dist/index.d.ts +376 -16
  4. package/dist/index.js +1687 -528
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +1680 -530
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +3 -2
  9. package/src/core/errors.ts +31 -0
  10. package/src/factory/index.ts +16 -6
  11. package/src/factory/provider-types.test.ts +32 -0
  12. package/src/factory/provider-types.ts +176 -0
  13. package/src/index.ts +6 -4
  14. package/src/providers/index.ts +1 -1
  15. package/src/providers/medusa/auth.test.ts +148 -25
  16. package/src/providers/medusa/auth.ts +129 -16
  17. package/src/providers/medusa/available-filters.test.ts +280 -0
  18. package/src/providers/medusa/catalog-facet-support.test.ts +715 -0
  19. package/src/providers/medusa/catalog-query.test.ts +422 -0
  20. package/src/providers/medusa/catalog-sort.test.ts +175 -0
  21. package/src/providers/medusa/customer-orders.test.ts +142 -0
  22. package/src/providers/medusa/index.test.ts +480 -0
  23. package/src/providers/medusa/index.ts +1592 -538
  24. package/src/providers/medusa/live-smoke.test.ts +68 -0
  25. package/src/providers/medusa/transforms.test.ts +222 -0
  26. package/src/providers/medusa/transforms.ts +152 -66
  27. package/src/providers/mock/catalog-query.test.ts +491 -0
  28. package/src/providers/mock/index.test.ts +66 -0
  29. package/src/providers/mock/index.ts +43 -1
  30. package/src/providers/mock/mock.ts +513 -3
  31. package/src/types/completion.ts +57 -0
  32. package/src/types/index.ts +7 -0
  33. package/.turbo/turbo-build.log +0 -18
  34. package/.turbo/turbo-test.log +0 -372
  35. package/.turbo/turbo-type-check.log +0 -0
  36. package/dist/.tsbuildinfo +0 -1
  37. package/publish.log +0 -93
@@ -1,372 +0,0 @@
1
-
2
- RUN v3.2.4 /home/nelson/dev/active/thorprovider/repos/thorcommerce/packages/adapters
3
-
4
- ✓ src/providers/stelorder/transforms.test.ts (6 tests) 35ms
5
- ↓ src/providers/stelorder/live-smoke.test.ts (1 test | 1 skipped)
6
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/index.js" points to missing source files
7
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/index.js" points to missing source files
8
- stderr | src/providers/medusa/auth.test.ts > MedusaAuthProvider > throws ProviderAPIError with login code on auth failure
9
- [2026-09-23T21:33:37.120Z] [@thorprovider/adapters:MedusaAuthProvider] ERROR: Login failed Error: bad credentials
10
- at /home/nelson/dev/active/thorprovider/repos/thorcommerce/packages/adapters/src/providers/medusa/auth.test.ts:75:48
11
- at file:///home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@vitest/runner/dist/chunk-hooks.js:155:11
12
- at file:///home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@vitest/runner/dist/chunk-hooks.js:752:26
13
- at file:///home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@vitest/runner/dist/chunk-hooks.js:1897:20
14
- at new Promise (<anonymous>)
15
- at runWithTimeout (file:///home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@vitest/runner/dist/chunk-hooks.js:1863:10)
16
- at runTest (file:///home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@vitest/runner/dist/chunk-hooks.js:1574:12)
17
-  at processTicksAndRejections (node:internal/process/task_queues:103:5)
18
- at runSuite (file:///home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@vitest/runner/dist/chunk-hooks.js:1729:8)
19
- at runSuite (file:///home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@vitest/runner/dist/chunk-hooks.js:1729:8)
20
-
21
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/api-key.js" points to missing source files
22
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/campaign.js" points to missing source files
23
- ✓ src/providers/stelorder/index.test.ts (2 tests) 150ms
24
- ✓ src/providers/medusa/auth.test.ts (5 tests) 138ms
25
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/claim.js" points to missing source files
26
- ✓ src/providers/stelorder/client.test.ts (3 tests) 189ms
27
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/currency.js" points to missing source files
28
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/customer.js" points to missing source files
29
- ✓ src/providers/medusa/admin.test.ts (19 tests) 245ms
30
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/customer-group.js" points to missing source files
31
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/draft-order.js" points to missing source files
32
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/exchange.js" points to missing source files
33
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/fulfillment.js" points to missing source files
34
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/fulfillment-provider.js" points to missing source files
35
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/fulfillment-set.js" points to missing source files
36
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/inventory-item.js" points to missing source files
37
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/invite.js" points to missing source files
38
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/notification.js" points to missing source files
39
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/order.js" points to missing source files
40
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/order-edit.js" points to missing source files
41
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/payment.js" points to missing source files
42
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/payment-collection.js" points to missing source files
43
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/plugin.js" points to missing source files
44
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/price-list.js" points to missing source files
45
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/price-preference.js" points to missing source files
46
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/product.js" points to missing source files
47
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/client.js" points to missing source files
48
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/product-category.js" points to missing source files
49
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/product-collection.js" points to missing source files
50
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/product-tag.js" points to missing source files
51
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/product-type.js" points to missing source files
52
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/product-variant.js" points to missing source files
53
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/promotion.js" points to missing source files
54
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/refund-reasons.js" points to missing source files
55
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/region.js" points to missing source files
56
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/reservation.js" points to missing source files
57
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/return.js" points to missing source files
58
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/return-reason.js" points to missing source files
59
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/sales-channel.js" points to missing source files
60
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/shipping-option.js" points to missing source files
61
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/shipping-profile.js" points to missing source files
62
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/stock-location.js" points to missing source files
63
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/store.js" points to missing source files
64
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/tax-provider.js" points to missing source files
65
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/tax-rate.js" points to missing source files
66
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/tax-region.js" points to missing source files
67
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/upload.js" points to missing source files
68
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/user.js" points to missing source files
69
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/views.js" points to missing source files
70
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/workflow-execution.js" points to missing source files
71
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/shipping-option-type.js" points to missing source files
72
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/locale.js" points to missing source files
73
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/translation.js" points to missing source files
74
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/rbac-role.js" points to missing source files
75
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/admin/rbac-policy.js" points to missing source files
76
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/auth/index.js" points to missing source files
77
- Sourcemap for "/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/store/index.js" points to missing source files
78
- ↓ src/providers/medusa/live-smoke.test.ts (1 test | 1 skipped)
79
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Products > getProduct returns transformed product when found
80
- [MSW] Error: intercepted a request without a matching request handler:
81
-
82
- • GET https://medusa.example.com/store/thor/capabilities
83
-
84
- If you still wish to intercept this unhandled request, please create a request handler for it.
85
- Read more: https://mswjs.io/docs/http/intercepting-requests
86
-
87
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Products > getProduct returns transformed product when found
88
- [2026-09-23T21:33:38.308Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
89
- url: 'https://medusa.example.com/store/thor/capabilities',
90
- totalAttempts: 1,
91
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
92
- }
93
-
94
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Products > getProduct returns undefined when not found
95
- [MSW] Error: intercepted a request without a matching request handler:
96
-
97
- • GET https://medusa.example.com/store/thor/capabilities
98
-
99
- If you still wish to intercept this unhandled request, please create a request handler for it.
100
- Read more: https://mswjs.io/docs/http/intercepting-requests
101
-
102
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Products > getProduct returns undefined when not found
103
- [2026-09-23T21:33:38.325Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
104
- url: 'https://medusa.example.com/store/thor/capabilities',
105
- totalAttempts: 1,
106
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
107
- }
108
-
109
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Products > getProduct throws ProviderAPIError on 503
110
- [MSW] Error: intercepted a request without a matching request handler:
111
-
112
- • GET https://medusa.example.com/store/thor/capabilities
113
-
114
- If you still wish to intercept this unhandled request, please create a request handler for it.
115
- Read more: https://mswjs.io/docs/http/intercepting-requests
116
-
117
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Products > getProduct throws ProviderAPIError on 503
118
- [2026-09-23T21:33:38.335Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
119
- url: 'https://medusa.example.com/store/thor/capabilities',
120
- totalAttempts: 1,
121
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
122
- }
123
-
124
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Products > getProduct throws ProviderAPIError on 503
125
- [2026-09-23T21:33:40.449Z] [@thorprovider/adapters:MedusaProvider] ERROR: getProduct failed after all retries {
126
- handle: 'any-handle',
127
- regionId: undefined,
128
- totalAttempts: 4,
129
- error: 'Service unavailable'
130
- }
131
-
132
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Products > getProducts returns array of transformed products
133
- [MSW] Error: intercepted a request without a matching request handler:
134
-
135
- • GET https://medusa.example.com/store/thor/capabilities
136
-
137
- If you still wish to intercept this unhandled request, please create a request handler for it.
138
- Read more: https://mswjs.io/docs/http/intercepting-requests
139
-
140
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Products > getProducts returns array of transformed products
141
- [2026-09-23T21:33:40.461Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
142
- url: 'https://medusa.example.com/store/thor/capabilities',
143
- totalAttempts: 1,
144
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
145
- }
146
-
147
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Products > getProducts returns empty array when backend returns none
148
- [MSW] Error: intercepted a request without a matching request handler:
149
-
150
- • GET https://medusa.example.com/store/thor/capabilities
151
-
152
- If you still wish to intercept this unhandled request, please create a request handler for it.
153
- Read more: https://mswjs.io/docs/http/intercepting-requests
154
-
155
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Products > getProducts returns empty array when backend returns none
156
- [2026-09-23T21:33:40.468Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
157
- url: 'https://medusa.example.com/store/thor/capabilities',
158
- totalAttempts: 1,
159
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
160
- }
161
-
162
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Cart > createCart returns a cart with an id
163
- [MSW] Error: intercepted a request without a matching request handler:
164
-
165
- • GET https://medusa.example.com/store/thor/capabilities
166
-
167
- If you still wish to intercept this unhandled request, please create a request handler for it.
168
- Read more: https://mswjs.io/docs/http/intercepting-requests
169
-
170
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Cart > createCart returns a cart with an id
171
- [2026-09-23T21:33:40.475Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
172
- url: 'https://medusa.example.com/store/thor/capabilities',
173
- totalAttempts: 1,
174
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
175
- }
176
-
177
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Cart > createCart with regionId passes region_id in payload
178
- [MSW] Error: intercepted a request without a matching request handler:
179
-
180
- • GET https://medusa.example.com/store/thor/capabilities
181
-
182
- If you still wish to intercept this unhandled request, please create a request handler for it.
183
- Read more: https://mswjs.io/docs/http/intercepting-requests
184
-
185
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Cart > createCart with regionId passes region_id in payload
186
- [2026-09-23T21:33:40.479Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
187
- url: 'https://medusa.example.com/store/thor/capabilities',
188
- totalAttempts: 1,
189
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
190
- }
191
-
192
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Cart > getCart returns cart when found
193
- [MSW] Error: intercepted a request without a matching request handler:
194
-
195
- • GET https://medusa.example.com/store/thor/capabilities
196
-
197
- If you still wish to intercept this unhandled request, please create a request handler for it.
198
- Read more: https://mswjs.io/docs/http/intercepting-requests
199
-
200
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Cart > getCart returns cart when found
201
- [2026-09-23T21:33:40.483Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
202
- url: 'https://medusa.example.com/store/thor/capabilities',
203
- totalAttempts: 1,
204
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
205
- }
206
-
207
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Cart > getCart returns undefined when cart not found (404)
208
- [MSW] Error: intercepted a request without a matching request handler:
209
-
210
- • GET https://medusa.example.com/store/thor/capabilities
211
-
212
- If you still wish to intercept this unhandled request, please create a request handler for it.
213
- Read more: https://mswjs.io/docs/http/intercepting-requests
214
-
215
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Cart > getCart returns undefined when cart not found (404)
216
- [2026-09-23T21:33:40.489Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
217
- url: 'https://medusa.example.com/store/thor/capabilities',
218
- totalAttempts: 1,
219
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
220
- }
221
-
222
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Cart > createCart throws ProviderAPIError on server error
223
- [MSW] Error: intercepted a request without a matching request handler:
224
-
225
- • GET https://medusa.example.com/store/thor/capabilities
226
-
227
- If you still wish to intercept this unhandled request, please create a request handler for it.
228
- Read more: https://mswjs.io/docs/http/intercepting-requests
229
-
230
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Cart > createCart throws ProviderAPIError on server error
231
- [2026-09-23T21:33:40.491Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
232
- url: 'https://medusa.example.com/store/thor/capabilities',
233
- totalAttempts: 1,
234
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
235
- }
236
-
237
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Cart > createCart throws ProviderAPIError on server error
238
- [2026-09-23T21:33:40.492Z] [@thorprovider/adapters:MedusaProvider] ERROR: Failed to create cart { error: 'Internal Server Error' }
239
-
240
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Regions > getRegions returns array of regions
241
- [MSW] Error: intercepted a request without a matching request handler:
242
-
243
- • GET https://medusa.example.com/store/thor/capabilities
244
-
245
- If you still wish to intercept this unhandled request, please create a request handler for it.
246
- Read more: https://mswjs.io/docs/http/intercepting-requests
247
-
248
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Regions > getRegions returns array of regions
249
- [2026-09-23T21:33:40.494Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
250
- url: 'https://medusa.example.com/store/thor/capabilities',
251
- totalAttempts: 1,
252
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
253
- }
254
-
255
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Regions > getRegions returns empty array when no regions
256
- [MSW] Error: intercepted a request without a matching request handler:
257
-
258
- • GET https://medusa.example.com/store/thor/capabilities
259
-
260
- If you still wish to intercept this unhandled request, please create a request handler for it.
261
- Read more: https://mswjs.io/docs/http/intercepting-requests
262
-
263
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Regions > getRegions returns empty array when no regions
264
- [2026-09-23T21:33:40.496Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
265
- url: 'https://medusa.example.com/store/thor/capabilities',
266
- totalAttempts: 1,
267
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
268
- }
269
-
270
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Shipping > getShippingMethods returns available methods
271
- [MSW] Error: intercepted a request without a matching request handler:
272
-
273
- • GET https://medusa.example.com/store/thor/capabilities
274
-
275
- If you still wish to intercept this unhandled request, please create a request handler for it.
276
- Read more: https://mswjs.io/docs/http/intercepting-requests
277
-
278
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Shipping > getShippingMethods returns available methods
279
- [2026-09-23T21:33:40.499Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
280
- url: 'https://medusa.example.com/store/thor/capabilities',
281
- totalAttempts: 1,
282
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
283
- }
284
-
285
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Shipping > getShippingMethods returns empty array when none available
286
- [MSW] Error: intercepted a request without a matching request handler:
287
-
288
- • GET https://medusa.example.com/store/thor/capabilities
289
-
290
- If you still wish to intercept this unhandled request, please create a request handler for it.
291
- Read more: https://mswjs.io/docs/http/intercepting-requests
292
-
293
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Shipping > getShippingMethods returns empty array when none available
294
- [2026-09-23T21:33:40.501Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
295
- url: 'https://medusa.example.com/store/thor/capabilities',
296
- totalAttempts: 1,
297
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
298
- }
299
-
300
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Payment > getPaymentMethods returns payment providers
301
- [MSW] Error: intercepted a request without a matching request handler:
302
-
303
- • GET https://medusa.example.com/store/thor/capabilities
304
-
305
- If you still wish to intercept this unhandled request, please create a request handler for it.
306
- Read more: https://mswjs.io/docs/http/intercepting-requests
307
-
308
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Payment > getPaymentMethods returns payment providers
309
- [2026-09-23T21:33:40.504Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
310
- url: 'https://medusa.example.com/store/thor/capabilities',
311
- totalAttempts: 1,
312
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
313
- }
314
-
315
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Error propagation > getProducts throws when backend returns 503
316
- [MSW] Error: intercepted a request without a matching request handler:
317
-
318
- • GET https://medusa.example.com/store/thor/capabilities
319
-
320
- If you still wish to intercept this unhandled request, please create a request handler for it.
321
- Read more: https://mswjs.io/docs/http/intercepting-requests
322
-
323
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Error propagation > getProducts throws when backend returns 503
324
- [2026-09-23T21:33:40.506Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
325
- url: 'https://medusa.example.com/store/thor/capabilities',
326
- totalAttempts: 1,
327
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
328
- }
329
-
330
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Error propagation > getProducts throws when backend returns 503
331
- [2026-09-23T21:33:42.614Z] [@thorprovider/adapters:MedusaProvider] ERROR: getProducts failed after all retries { totalAttempts: 4, error: 'Service Unavailable' }
332
-
333
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Error propagation > getProducts throws when backend returns 503
334
- [2026-09-23T21:33:42.617Z] [@thorprovider/adapters:MedusaProvider] ERROR: getProducts error details {
335
- message: 'Service Unavailable',
336
- status: 503,
337
- type: undefined,
338
- code: undefined,
339
- stack: 'Error: Service Unavailable\n' +
340
- ' at /home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/src/client.ts:91:11\n' +
341
- ' at Generator.next (<anonymous>)\n' +
342
- ' at fulfilled (/home/nelson/dev/active/thorprovider/repos/thorcommerce/node_modules/@medusajs/js-sdk/dist/esm/client.js:10:58)',
343
- fullError: '{\n "statusText": "Service Unavailable",\n "status": 503\n}'
344
- }
345
-
346
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Error propagation > createCart throws when backend returns 500
347
- [MSW] Error: intercepted a request without a matching request handler:
348
-
349
- • GET https://medusa.example.com/store/thor/capabilities
350
-
351
- If you still wish to intercept this unhandled request, please create a request handler for it.
352
- Read more: https://mswjs.io/docs/http/intercepting-requests
353
-
354
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Error propagation > createCart throws when backend returns 500
355
- [2026-09-23T21:33:42.623Z] [@thorprovider/adapters:FetchUtils] ERROR: Fetch failed after all retries {
356
- url: 'https://medusa.example.com/store/thor/capabilities',
357
- totalAttempts: 1,
358
- error: '[MSW] Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'
359
- }
360
-
361
- stderr | src/providers/medusa/index.test.ts > MedusaProvider — Error propagation > createCart throws when backend returns 500
362
- [2026-09-23T21:33:42.623Z] [@thorprovider/adapters:MedusaProvider] ERROR: Failed to create cart { error: 'Internal Server Error' }
363
-
364
- ✓ src/providers/medusa/index.test.ts (17 tests) 4412ms
365
- ✓ MedusaProvider — Products > getProduct throws ProviderAPIError on 503 2127ms
366
- ✓ MedusaProvider — Error propagation > getProducts throws when backend returns 503 2114ms
367
-
368
- Test Files 6 passed | 2 skipped (8)
369
- Tests 52 passed | 2 skipped (54)
370
- Start at 17:33:34
371
- Duration 8.33s (transform 3.59s, setup 7.42s, collect 8.80s, tests 5.17s, environment 13ms, prepare 2.89s)
372
-
File without changes