From 829744f337b4e5cdada4251c82e1f2b03b747018 Mon Sep 17 00:00:00 2001 From: sistemd Date: Wed, 24 Jan 2024 12:34:39 +0100 Subject: [PATCH] change UNEXPECTED_ERROR data to string --- CHANGELOG.md | 1 + crates/rpc/src/error.rs | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e5ea95a43..94d6918c19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - `starknet_getEvents` incorrectly evaluates empty sub-lists in key filters for pending events. +- For `UNEXPECTED_ERROR`, change the `data` field into a `string` to comply with the spec. ## [0.10.3] - 2024-01-04 diff --git a/crates/rpc/src/error.rs b/crates/rpc/src/error.rs index cd57c98d60..b16a9c9c51 100644 --- a/crates/rpc/src/error.rs +++ b/crates/rpc/src/error.rs @@ -199,9 +199,7 @@ impl ApplicationError { "limit": limit, "requested": requested, })), - ApplicationError::UnexpectedError { data } => Some(json!({ - "error": data, - })), + ApplicationError::UnexpectedError { data } => Some(json!(data)), ApplicationError::ProofLimitExceeded { limit, requested } => Some(json!({ "limit": limit, "requested": requested,