[package]
name = "api-error"
version.workspace = true
description.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
readme.workspace = true
categories.workspace = true

[dependencies]
api-error-derive = { path = "../api-error-derive", version = "0.1", optional = true }

http = "1"
serde_core = { version = "1", optional = true }
axum-core = { version = "0.5", default-features = false, optional = true }
serde_json = { version = "1", optional = true }

[dev-dependencies]
thiserror = "2"
trybuild = "1"
axum = { version = "0.8", default-features = false }

[features]
default = ["derive"]
derive = ["dep:api-error-derive"]
axum = [
    "dep:axum-core",
    "dep:serde_core",
    "dep:serde_json",
    "api-error-derive?/axum",
]
