hyperlane-plugin-problem-details 23.4.0

An RFC 9457 Problem Details (application/problem+json) error normalizer and builder plugin for the Hyperlane framework with zero-overhead 2xx/3xx fast path and automatic 4xx/5xx error structuring.
Documentation
<div align="center">

<img src="https://devhub.vip/pages/docs/img/hyperlane.png" alt="hyperlane-plugin-problem-details logo" height="120">

# hyperlane-plugin-problem-details

**RFC 9457 (`application/problem+json`) Error Normalizer & Builder Plugin**

[![Crates.io Version](https://flat.badgen.net/crates/v/hyperlane-plugin-problem-details)](https://crates.io/crates/hyperlane-plugin-problem-details)
[![Docs.rs](https://img.shields.io/docsrs/hyperlane-plugin-problem-details?style=flat-square)](https://docs.rs/hyperlane-plugin-problem-details)
[![CI Status](https://img.shields.io/github/actions/workflow/status/hyperlane-dev/hyperlane/rust.yml?branch=master&style=flat-square&label=CI)](https://github.com/hyperlane-dev/hyperlane/actions/workflows/rust.yml)
[![Rust 2024](https://img.shields.io/badge/edition-2024-orange.svg?style=flat-square)](https://www.rust-lang.org)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](../../LICENSE)

[Workspace Overview](../../README.md) · [Plugin Catalog](../README.md) · [API Docs](https://docs.rs/hyperlane-plugin-problem-details/latest/)

</div>

---

## Overview

`hyperlane-plugin-problem-details` standardizes HTTP error responses as RFC 9457 `application/problem+json` payloads for [`hyperlane`](../../README.md) services (response hook order `-62`). It is opt-in and transparent (`Status::Continue`) when unconfigured.

## Installation

```sh
cargo add hyperlane-plugin-problem-details
```

## Usage

```rust
use hyperlane_plugin_problem_details::{ProblemDetailsConfig, ProblemDetailsPlugin};

fn setup_problem_details() {
    ProblemDetailsPlugin::init(ProblemDetailsConfig::default());
}
```

## Verification

```sh
cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p hyperlane-plugin-problem-details --all-features --all-targets -- -D warnings
cargo test -p hyperlane-plugin-problem-details --all-features
```

## License

This project is licensed under the MIT License. See the [LICENSE](../../LICENSE) file for details.

## Contact

For inquiries, please contact the author at [root@devhub.vip](mailto:root@devhub.vip).