Skip to content

findPlacesNearPoint does not use abort signal #1199

@mpayson

Description

@mpayson

Describe the bug

findPlacesNearPoint does not use the abort signal that is passed to it

Reproduction

The following code snippet logs the response, rather than an abort error

import { ApiKeyManager } from "@esri/arcgis-rest-request";
import { findPlacesNearPoint } from "@esri/arcgis-rest-places";

const apiKey = "<replace me>";

const abortController = new AbortController();
findPlacesNearPoint({
  x: -73.735152,
  y: 40.9384275,
  radius: 1600 * 5, // 5 miles in meters
  categoryIds: ["4d4b7105d754a06372d81259"], // Schools
  authentication: ApiKeyManager.fromKey(apiKey),
  signal: abortController.signal,
})
  .then((response) => {
    console.log(response);
  })
  .catch((error) => {
    console.error(error);
  });

abortController.abort();

Logs

System Info

"@esri/arcgis-rest-places": "1.2.0"

Additional Information

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions