(url2, init, ms, controller)
| 69792 | return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; |
| 69793 | } |
| 69794 | if (value === null) { |
| 69795 | return `${encodeURIComponent(key)}=`; |
| 69796 | } |
| 69797 | throw new AnthropicError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`); |
| 69798 | }).join("&"); |
| 69799 | } |
| 69800 | async fetchWithTimeout(url2, init, ms, controller) { |
| 69801 | const { signal, ...options } = init || {}; |
| 69802 | if (signal) |
| 69803 | signal.addEventListener("abort", () => controller.abort()); |
| 69804 | const timeout = setTimeout(() => controller.abort(), ms); |
| 69805 | return this.getRequestClient().fetch.call(void 0, url2, { signal: controller.signal, ...options }).finally(() => { |
no test coverage detected