try fix url construct

This commit is contained in:
2025-03-18 20:48:14 +08:00
parent 1b6ec67ba8
commit a4a45bba1c
2 changed files with 3 additions and 3 deletions

View File

@@ -23,4 +23,4 @@ jobs:
- name: 📦 Build - name: 📦 Build
run: bun run build run: bun run build
- name: 📦 Upload SourceMap - name: 📦 Upload SourceMap
run: bunx @hyperdx/cli upload-sourcemaps --path dist\assets run: bunx @hyperdx/cli upload-sourcemaps --serviceKey ${{ secrets.HYPERDX_SERVICE_KEY }} --path dist\assets

View File

@@ -43,7 +43,7 @@ async function QueryPostAPIWithParamsInternal<T>(
) { ) {
let url: URL let url: URL
try { try {
url = new URL(urlString) url = new URL(urlString.toString())
} catch (e) { } catch (e) {
console.error('尝试解析API地址失败: ' + urlString, e) console.error('尝试解析API地址失败: ' + urlString, e)
return { return {
@@ -97,7 +97,7 @@ async function QueryGetAPIInternal<T>(
try { try {
let url: URL let url: URL
try { try {
url = new URL(urlString) url = new URL(urlString.toString())
} catch (e) { } catch (e) {
console.error('尝试解析API地址失败: ' + urlString, e) console.error('尝试解析API地址失败: ' + urlString, e)
return { return {