Skip to content

Commit 829744f

Browse files
sistemdMirko-von-Leipzig
authored andcommitted
change UNEXPECTED_ERROR data to string
1 parent fe1ea50 commit 829744f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Fixed
1313

1414
- `starknet_getEvents` incorrectly evaluates empty sub-lists in key filters for pending events.
15+
- For `UNEXPECTED_ERROR`, change the `data` field into a `string` to comply with the spec.
1516

1617
## [0.10.3] - 2024-01-04
1718

crates/rpc/src/error.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ impl ApplicationError {
199199
"limit": limit,
200200
"requested": requested,
201201
})),
202-
ApplicationError::UnexpectedError { data } => Some(json!({
203-
"error": data,
204-
})),
202+
ApplicationError::UnexpectedError { data } => Some(json!(data)),
205203
ApplicationError::ProofLimitExceeded { limit, requested } => Some(json!({
206204
"limit": limit,
207205
"requested": requested,

0 commit comments

Comments
 (0)