From aee84f9634a9c911040416ea96365d032cd560b0 Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Wed, 17 Apr 2024 11:20:34 -0400 Subject: [PATCH] fix: remove field name collision on esplora error for JVM --- bdk-ffi/src/bdk.udl | 2 +- bdk-ffi/src/error.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bdk-ffi/src/bdk.udl b/bdk-ffi/src/bdk.udl index 90ad290..bac3593 100644 --- a/bdk-ffi/src/bdk.udl +++ b/bdk-ffi/src/bdk.udl @@ -35,7 +35,7 @@ interface PersistenceError { [Error] interface EsploraError { Minreq(string error_message); - HttpResponse(u16 status, string message); + HttpResponse(u16 status, string error_message); Parsing(string error_message); StatusCode(string error_message); BitcoinEncoding(string error_message); diff --git a/bdk-ffi/src/error.rs b/bdk-ffi/src/error.rs index 8e07d85..e0ac314 100644 --- a/bdk-ffi/src/error.rs +++ b/bdk-ffi/src/error.rs @@ -73,8 +73,8 @@ pub enum EsploraError { #[error("minreq error: {error_message}")] Minreq { error_message: String }, - #[error("http error with status code {status} and message {message}")] - HttpResponse { status: u16, message: String }, + #[error("http error with status code {status} and message {error_message}")] + HttpResponse { status: u16, error_message: String }, #[error("parsing error: {error_message}")] Parsing { error_message: String }, @@ -385,7 +385,7 @@ impl From for EsploraError { error_message: e.to_string(), }, BdkEsploraError::HttpResponse { status, message } => { - EsploraError::HttpResponse { status, message } + EsploraError::HttpResponse { status: status, error_message: message } } BdkEsploraError::Parsing(e) => EsploraError::Parsing { error_message: e.to_string(),