UNPKG

@wwdrew/expo-spotify-sdk

Version:

Expo module wrapping the native Spotify iOS (v5) and Android (v4) SDKs for OAuth authentication and App Remote playback control

25 lines 688 B
/** * Abstract base class for every error thrown by this library. Carry a * structured `code` and a `namespace` so catch-all handlers can branch * without importing concrete subclasses. * * Always thrown as one of the per-namespace subclasses: * `AuthError`, `AppRemoteError`, `PlayerError`, `UserError`, * `ContentError`, `ImagesError`. * * @example * ```ts * try { ... } catch (e) { * if (e instanceof SpotifyError) { * console.error(e.namespace, e.code, e.message); * } * } * ``` */ export class SpotifyError extends Error { constructor(message) { super(message); this.name = this.constructor.name; } } //# sourceMappingURL=error.js.map