Skip to content
Client
Server

Reference / @open-music-sdk/core / retryable

Function: retryable() ​

ts
function retryable(e): boolean;

Defined in: packages/core/src/retry.ts:33

Network failures, 429, and 5xx other than 501 (reserved, never implemented). A developer token that could not be obtained is judged the same way, by what its source answered: no status means the source was unreachable.

Parameters ​

e ​

AppleMusicError

The error an attempt failed with.

Returns ​

boolean

Whether another attempt is worth making: a NetworkError, a RateLimited, an ApiError with a 5xx status other than 501, or a DeveloperTokenUnavailable with no status, a 429 or such a 5xx.

MIT licensed. Not affiliated with, endorsed by, or sponsored by Apple Inc. Apple Music and MusicKit are trademarks of Apple Inc.