Class: MoneriumApiError
Thrown when the Monerium API returns a non-2xx response. Fields map directly to the API response body — nothing is translated or normalised.
Example
try {
await client.getProfiles();
} catch (err) {
if (err instanceof MoneriumApiError) {
console.log(err.code); // 401
console.log(err.status); // "Unauthorized"
console.log(err.message); // "Not authenticated"
console.log(err.errors); // field-level validation errors, if present
}
}