chore: safePromise 优化

This commit is contained in:
xiaojunnuo
2025-04-30 09:38:44 +08:00
parent 5f85219495
commit 424890a1e1
5 changed files with 52 additions and 56 deletions
@@ -1,4 +1,4 @@
import { HttpClient, ILogger, utils } from "@certd/basic";
import { HttpClient, ILogger, safePromise, utils } from "@certd/basic";
import { QiniuAccess } from "../access.js";
import fs from "fs";
@@ -77,7 +77,7 @@ export class QiniuClient {
const http = new HttpClient({ timeout: 10000, middlewares: [auth] });
console.log("http", http);
return new Promise((resolve, reject) => {
return safePromise((resolve, reject) => {
try {
http.get({
url: opts.url,