Skip to content

Commit

Permalink
fix: remove field name collision on esplora error for JVM
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Apr 17, 2024
1 parent a35fdae commit aee84f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bdk-ffi/src/bdk.udl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions bdk-ffi/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -385,7 +385,7 @@ impl From<BdkEsploraError> 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(),
Expand Down

0 comments on commit aee84f9

Please sign in to comment.