mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
chore: plus
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { utils } from '@certd/pipeline';
|
||||
|
||||
export async function request(config: any) {
|
||||
try {
|
||||
return await utils.http(config);
|
||||
} catch (e) {
|
||||
const data = e.data || e.response?.data;
|
||||
if (data) {
|
||||
throw new Error(data.message || data.msg || data.error || data);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user