mirror of
https://github.com/certd/certd.git
synced 2026-04-28 07:57:25 +08:00
chore: plesk ok
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import axios, { AxiosRequestConfig } from 'axios';
|
import axios, { AxiosHeaders, AxiosRequestConfig } from 'axios';
|
||||||
import { ILogger, logger } from './util.log.js';
|
import { ILogger, logger } from './util.log.js';
|
||||||
import { Logger } from 'log4js';
|
import { Logger } from 'log4js';
|
||||||
import { HttpProxyAgent } from 'http-proxy-agent';
|
import { HttpProxyAgent } from 'http-proxy-agent';
|
||||||
@@ -13,7 +13,7 @@ export class HttpError extends Error {
|
|||||||
statusText?: string;
|
statusText?: string;
|
||||||
code?: string;
|
code?: string;
|
||||||
request?: { baseURL: string; url: string; method: string; params?: any; data?: any };
|
request?: { baseURL: string; url: string; method: string; params?: any; data?: any };
|
||||||
response?: { data: any };
|
response?: { data: any; headers: AxiosHeaders };
|
||||||
cause?: any;
|
cause?: any;
|
||||||
constructor(error: any) {
|
constructor(error: any) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
@@ -55,6 +55,7 @@ export class HttpError extends Error {
|
|||||||
|
|
||||||
this.response = {
|
this.response = {
|
||||||
data: error.response?.data,
|
data: error.response?.data,
|
||||||
|
headers: error.response?.headers,
|
||||||
};
|
};
|
||||||
|
|
||||||
const { stack, cause } = error;
|
const { stack, cause } = error;
|
||||||
|
|||||||
Reference in New Issue
Block a user