1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// SPDX-FileCopyrightText: 2025 RAprogramm <andrey.rozanov.vl@gmail.com>
//
// SPDX-License-Identifier: MIT
//! Turnkey integration: error kinds, classification, and conversions.
//!
//! This module centralizes Turnkey-specific error taxonomy and mapping into
//! framework-agnostic [`crate::AppError`] and [`crate::AppErrorKind`].
//!
//! # Goals
//! - Stable domain kinds (`TurnkeyErrorKind`) decoupled from SDK texts.
//! - Conservative mapping to the canonical [`crate::AppErrorKind`].
//! - Heuristic classifier for stringly-typed upstream errors.
//!
//! # Examples
//!
//! ```rust
//! use masterror::{
//! AppError, AppErrorKind,
//! turnkey::{TurnkeyError, TurnkeyErrorKind, classify_turnkey_error}
//! };
//!
//! // Construct a domain error
//! let e = TurnkeyError::new(TurnkeyErrorKind::RateLimited, "429 from upstream");
//!
//! // Convert into AppError for transport mapping
//! let app: AppError = e.clone().into();
//! assert_eq!(app.kind, AppErrorKind::RateLimited);
//!
//! // Classify raw SDK message
//! let k = classify_turnkey_error("label must be unique");
//! assert!(matches!(k, TurnkeyErrorKind::UniqueLabel));
//! ```
pub use classify_turnkey_error;
pub use ;