-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exception-json-http.ts
46 lines (41 loc) · 1.07 KB
/
exception-json-http.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* @file Interfaces - HttpExceptionJSON
* @module exceptions/interfaces/HttpExceptionJSON
*/
import type { ClassName, Status, StatusName } from '#src/enums'
import type {
JsonifiableObject,
Nullable,
ObjectPlain
} from '@flex-development/tutils'
import type ExceptionJSON from './exception-json'
/**
* JSON representation of an `HttpException`.
*
* @template T - Aggregated error type
* @template Data - Exception data type
* @template Cause - Exception cause type
* @template Code - Exception code type
*
* @extends {ExceptionJSON<T,Data,Cause,Code>}
*/
interface HttpExceptionJSON<
T extends ObjectPlain = JsonifiableObject,
Data extends ObjectPlain = JsonifiableObject,
Cause extends ObjectPlain = JsonifiableObject,
Code extends Nullable<number | string> = string
> extends ExceptionJSON<T, Data, Cause, Code> {
/**
* CSS class name.
*/
readonly classname: ClassName
/**
* Exception status name.
*/
readonly name: StatusName
/**
* Exception status code.
*/
readonly status: Status
}
export type { HttpExceptionJSON as default }