crate.artistOrNull(key)
artistOrNull(key: string, opts?: RequestOptions): Promise<ArtistDossierContract | null>Like artist, but returns null for the honest-gap case (a locator or numeric id that resolves to no cluster) instead of throwing. crate is honest about absence — reach for this in pipelines and agent loops where ‘not found’ is a normal branch, not an exception to catch.
| Endpoint | GET /api/v2/artist/{key} |
| Auth | key |
| Returns | `ArtistDossierContract |
| Retryable | yes |
| Idempotent | yes |
Example
Section titled “Example”const a = await crate.artistOrNull('discogs:999999'); // → null if unresolvedif (a) console.log(a.display);Throws
Section titled “Throws”CrateAPIError— on a non-2xx response.