isRequestCanceled(err)
Uses a cancel token source object to determine if a request has been canceled.
Returns
The Boolean value true if the request is canceled.
Parameters
Name | Type | Description | Required |
err | object | The error object received when the request is canceled. | ✅ |
Usage example
In this example, the API uses a cancel token source object to determine if a request has been canceled.
const { isRequestCanceled } = PCore.getRestClient();
if(isRequestCanceled(error)) {}
Previous topic invokeRestApi(routeKey, optionsObject, context) Next topic RestApiOptionsObject