Class: NotFoundHttpError\<ResourceType>
An NotFoundHttpError triggers when a Solid server returns a 404 status. This error is not returned in most cases as a "absent" resource is not considered an error, but it is thrown while trying for find a WAC rule for a resource that does not exist.
Type parameters
| Name | Type | 
|---|---|
| ResourceType | extends Resource | 
Hierarchy
- HttpErrorResult\<- ResourceType>
↳ NotFoundHttpError
Constructors
constructor
• new NotFoundHttpError\<ResourceType>(resource, response, message?): NotFoundHttpError\<ResourceType>
Type parameters
| Name | Type | 
|---|---|
| ResourceType | extends Resource\<string> | 
Parameters
| Name | Type | Description | 
|---|---|---|
| resource | ResourceType | the resource | 
| response | Response | The response returned by the HTTP requests | 
| message? | string | A custom message for the error | 
Returns
NotFoundHttpError\<ResourceType>
Inherited from
Defined in
packages/connected-solid/src/requester/results/error/HttpErrorResult.ts:39
Properties
headers
• Readonly headers: Headers
Headers returned by the HTTP request
Inherited from
Defined in
packages/connected-solid/src/requester/results/error/HttpErrorResult.ts:27
isError
• Readonly isError: true
Inherited from
Defined in
packages/connected/dist/results/error/ErrorResult.d.ts:5
resource
• Readonly resource: ResourceType
Inherited from
Defined in
packages/connected/dist/results/error/ErrorResult.d.ts:10
response
• Readonly response: Response
Response returned by the HTTP request
Inherited from
Defined in
packages/connected-solid/src/requester/results/error/HttpErrorResult.ts:32
status
• Readonly status: number
The status of the HTTP request
Inherited from
Defined in
packages/connected-solid/src/requester/results/error/HttpErrorResult.ts:22
type
• Readonly type: "notFoundError"
Overrides
Defined in
packages/connected-solid/src/requester/results/error/HttpErrorResult.ts:147
uri
• Readonly uri: ResourceType["uri"]
Inherited from
Defined in
packages/connected/dist/results/error/ErrorResult.d.ts:9
Methods
checkResponse
▸ checkResponse\<ResourceType>(resource, response): undefined | HttpErrorResultType\<ResourceType>
Checks a given response to see if it is a ServerHttpError, an UnauthenticatedHttpError or a some unexpected error.
Type parameters
| Name | Type | 
|---|---|
| ResourceType | extends Resource\<string> | 
Parameters
| Name | Type | Description | 
|---|---|---|
| resource | ResourceType | - | 
| response | Response | The response of the request | 
Returns
undefined | HttpErrorResultType\<ResourceType>
An error if the response calls for it. Undefined if not.
Inherited from
Defined in
packages/connected-solid/src/requester/results/error/HttpErrorResult.ts:70
is
▸ is(response): boolean
Indicates if a specific response constitutes an NotFoundHttpError
Parameters
| Name | Type | Description | 
|---|---|---|
| response | Response | The request response | 
Returns
boolean
true if this response constitutes an NotFoundHttpError
Defined in
packages/connected-solid/src/requester/results/error/HttpErrorResult.ts:154
isnt
▸ isnt(response): boolean
Checks to see if a given response does not constitute an HTTP Error
Parameters
| Name | Type | Description | 
|---|---|---|
| response | Response | The response of the request | 
Returns
boolean
true if the response does not constitute an HTTP Error
Inherited from
Defined in
packages/connected-solid/src/requester/results/error/HttpErrorResult.ts:55