Class: FanbookApiError
Fanbook API 请求错误。
Extends
Error
Constructors
new FanbookApiError()
new FanbookApiError(
code
?,description
?,request
?,response
?,error
?):FanbookApiError
Parameters
Parameter | Type | Description |
---|---|---|
code ? | number | 错误码。 |
description ? | string | 错误信息。 |
request ? | AxiosRequestConfig <any > | 请求对象。 |
response ? | AxiosResponse <any , any > | 响应对象。 |
error ? | unknown | axios 抛出的错误。 |
Returns
Overrides
Error.constructor
Defined in
Properties
code?
optional
code:number
错误码。
Defined in
description?
optional
description:string
错误信息。
Defined in
error?
optional
error:unknown
axios 抛出的错误。
Defined in
message
message:
string
Inherited from
Error.message
Defined in
node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts:1077
name
name:
string
Inherited from
Error.name
Defined in
node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts:1076
request?
optional
request:AxiosRequestConfig
<any
>
请求对象。
Defined in
response?
optional
response:AxiosResponse
<any
,any
>
响应对象。
Defined in
stack?
optional
stack:string
Inherited from
Error.stack
Defined in
node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts:1078
prepareStackTrace()?
static
optional
prepareStackTrace: (err
,stackTraces
) =>any
Optional override for formatting stack traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTrace
Defined in
node_modules/.pnpm/@types+node@20.11.28/node_modules/@types/node/globals.d.ts:28
stackTraceLimit
static
stackTraceLimit:number
Inherited from
Error.stackTraceLimit
Defined in
node_modules/.pnpm/@types+node@20.11.28/node_modules/@types/node/globals.d.ts:30
Methods
captureStackTrace()
static
captureStackTrace(targetObject
,constructorOpt
?):void
Create .stack property on a target object
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt ? | Function |
Returns
void
Inherited from
Error.captureStackTrace
Defined in
node_modules/.pnpm/@types+node@20.11.28/node_modules/@types/node/globals.d.ts:21