ClientErrorResponse
Class
ClientErrorResponse
Hierarchy
↳ ClientErrorResponse
Index
Constructors
Properties
Methods
- addHeaders
- appendHeader
- apply
- applyHeaders
- getStatusCode
- patchContext
- removeHeader
- setBody
- setHeader
- setHeaders
- setStatusCode
- badRequest
- conflict
- create
- expectationFailed
- failedDependency
- forbidden
- gone
- iAmATeapot
- lengthRequired
- locked
- methodNotAllowed
- misdirectedRequest
- notAcceptable
- notFound
- payloadTooLarge
- paymentRequired
- preconditionFailed
- preconditionRequired
- proxyAuthenticationRequired
- rangeNotSatisfiable
- requestHeaderFieldsTooLarge
- requestTimeout
- tooManyRequests
- unauthorized
- unavailableForLegalReasons
- unprocessableEntity
- unsupportedMediaType
- upgradeRequired
- uriTooLong
Constructors
Protected
constructor
new ClientErrorResponse(__namedParameters: object
): ClientErrorResponse
Inherited from Response.constructor
Defined in Library/Response/Response.ts:17
Parameters:
__namedParameters: object
Name | Type |
---|---|
data | any |
message | string |
meta | any |
statusCode | HttpStatusCodes |
Returns: ClientErrorResponse
Properties
Protected
ctx
ctx: ContextInterface
Defined in Library/Response/Response.ts:7
Protected
data
data: any
Defined in Library/Response/Response.ts:15
Protected
headers
headers: object
Inherited from Response.headers
Defined in Library/Response/Response.ts:9
Type declaration
[header: string
]: string
| Array
<string
>
Protected
message
message: string
Inherited from Response.message
Defined in Library/Response/Response.ts:17
Protected
meta
meta: any
Defined in Library/Response/Response.ts:13
Protected
statusCode
statusCode: HttpStatusCodes
Inherited from Response.statusCode
Defined in Library/Response/Response.ts:11
Methods
addHeaders
addHeaders(headers: object
): this
Inherited from Response.addHeaders
Defined in Library/Response/Response.ts:54
Parameters:
Name | Type |
---|---|
headers | object |
Returns: this
appendHeader
appendHeader(header: string
, value: * string
| Array
<string
>*): void
Inherited from Response.appendHeader
Defined in Library/Response/Response.ts:66
Parameters:
Name | Type |
---|---|
header | string |
value | string | Array <string > |
Returns: void
apply
apply(): void
Defined in Library/Response/ClientErrorResponse.ts:121
Returns: void
applyHeaders
applyHeaders(): this
Inherited from Response.applyHeaders
Defined in Library/Response/Response.ts:76
Returns: this
getStatusCode
getStatusCode(): HttpStatusCodes
Inherited from Response.getStatusCode
Defined in Library/Response/Response.ts:38
Returns: HttpStatusCodes
patchContext
patchContext(ctx: ContextInterface): void
Inherited from Response.patchContext
Defined in Library/Response/Response.ts:26
Parameters:
Name | Type |
---|---|
ctx | ContextInterface |
Returns: void
removeHeader
removeHeader(header: string
): this
Inherited from Response.removeHeader
Defined in Library/Response/Response.ts:70
Parameters:
Name | Type |
---|---|
header | string |
Returns: this
Protected
setBody
setBody(body: any
): this
Inherited from Response.setBody
Defined in Library/Response/Response.ts:42
Parameters:
Name | Type |
---|---|
body | any |
Returns: this
setHeader
setHeader(header: string
, value: * string
| Array
<string
>*): this
Inherited from Response.setHeader
Defined in Library/Response/Response.ts:60
Parameters:
Name | Type |
---|---|
header | string |
value | string | Array <string > |
Returns: this
setHeaders
setHeaders(headers: object
): this
Inherited from Response.setHeaders
Defined in Library/Response/Response.ts:48
Parameters:
Name | Type |
---|---|
headers | object |
Returns: this
setStatusCode
setStatusCode(statusCode: HttpStatusCodes): this
Inherited from Response.setStatusCode
Defined in Library/Response/Response.ts:32
Parameters:
Name | Type |
---|---|
statusCode | HttpStatusCodes |
Returns: this
Static
badRequest
badRequest(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:9
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
conflict
conflict(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:45
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
create
create(statusCode: HttpStatusCodes, message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:5
Parameters:
Name | Type |
---|---|
statusCode | HttpStatusCodes |
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
expectationFailed
expectationFailed(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:77
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
failedDependency
failedDependency(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:97
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
forbidden
forbidden(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:21
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
gone
gone(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:49
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
iAmATeapot
iAmATeapot(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:81
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
lengthRequired
lengthRequired(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:53
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
locked
locked(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:93
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
methodNotAllowed
methodNotAllowed(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:29
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
misdirectedRequest
misdirectedRequest(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:85
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
notAcceptable
notAcceptable(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:33
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
notFound
notFound(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:25
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
payloadTooLarge
payloadTooLarge(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:61
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
paymentRequired
paymentRequired(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:17
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
preconditionFailed
preconditionFailed(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:57
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
preconditionRequired
preconditionRequired(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:105
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
proxyAuthenticationRequired
proxyAuthenticationRequired(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:37
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
rangeNotSatisfiable
rangeNotSatisfiable(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:73
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
requestHeaderFieldsTooLarge
requestHeaderFieldsTooLarge(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:113
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
requestTimeout
requestTimeout(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:41
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
tooManyRequests
tooManyRequests(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:109
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
unauthorized
unauthorized(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:13
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
unavailableForLegalReasons
unavailableForLegalReasons(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:117
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
unprocessableEntity
unprocessableEntity(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:89
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
unsupportedMediaType
unsupportedMediaType(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:69
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
upgradeRequired
upgradeRequired(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:101
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse
Static
uriTooLong
uriTooLong(message?: string
, data?: any
, meta?: any
): ClientErrorResponse
Defined in Library/Response/ClientErrorResponse.ts:65
Parameters:
Name | Type |
---|---|
Optional message | string |
Optional data | any |
Optional meta | any |
Returns: ClientErrorResponse