| // Copyright 2026 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| use thiserror::Error; |
| |
| use crate::types::PlayingOrder; |
| |
| #[derive(Debug, Error)] |
| pub enum Error { |
| #[error("Service is already published")] |
| AlreadyPublished, |
| |
| #[error("Feature not supported or configured on this server: {0}")] |
| FeatureNotSupported(&'static str), |
| |
| #[error("Playing order {0:?} is not supported by this server")] |
| UnsupportedPlayingOrder(PlayingOrder), |
| |
| #[error("GATT operation error: {0}")] |
| Gatt(#[from] bt_gatt::types::Error), |
| |
| #[error("Packet encoding/decoding error: {0}")] |
| Packet(#[from] bt_common::packet_encoding::Error), |
| |
| #[error("Other error: {0}")] |
| Other(String), |
| } |