use reqwest::StatusCode;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum BrazeApiError {
#[error("HTTP {status}: {body}")]
Http { status: StatusCode, body: String },
#[error("network error: {0}")]
Network(#[from] reqwest::Error),
#[error("authentication failed (invalid api key)")]
Unauthorized,
#[error("Braze resource not found: {resource}")]
NotFound { resource: String },
#[error("rate limit retries exhausted")]
RateLimitExhausted,
}