cdumay_error_base64
A small utility crate for converting base64::DecodeError into structured, typed errors using the cdumay_error framework. This allows consistent, meaningful error reporting with custom codes, messages, and additional context.
Features
- Maps all variants of
base64::DecodeErrorinto structuredcdumay_error::Errortypes. - Provides unique error codes, HTTP status codes, and human-readable messages.
- Easily attach contextual metadata for better debugging.
- Simple integration into any Rust project using
base64andcdumay_error. - Provides a convenient
convert_result!macro for error conversion
Usage
Using the Base64DecodeErrorConverter directly:
use ;
use ErrorConverter;
use BTreeMap;
use Base64DecodeErrorConverter;
Using the convert_result! macro:
use ;
use ErrorConverter;
use BTreeMap;
use convert_result;