Contents

RequestError

The error that a service method’s returned promise rejects with when a request fails.

Declaration

class RequestError extends Error

Mentioned in

Discussion

When a Service method’s returned promise rejects, the rejection value is a RequestError. The message property contains a ConfigurationErrorStatus value that describes the error.

const search = new mapkit.Search();

try {
    const data = await search.search("coffee");
} catch (error) {
    if (error.message === "Too Many Requests") {
        // Handle rate limiting.
    }
}

Topics

Properties

See Also

Service