Skip to content

Commit

Permalink
fix(cursor): A better error message in JsonCursor.
Browse files Browse the repository at this point in the history
Print the source JSON string in the error message.
  • Loading branch information
pravic committed Nov 27, 2024
1 parent 9951588 commit 5f3b985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl<T> JsonCursor<T> {
match serde_json::from_str(workaround_51132(line)) {
Ok(JsonRow::Row(value)) => return Ok(Some(value)),
Ok(JsonRow::Progress { .. }) => continue,
Err(err) => return Err(Error::BadResponse(err.to_string())),
Err(err) => return Err(Error::BadResponse(format!("{err} in line {line:?}"))),
}
}

Expand Down

0 comments on commit 5f3b985

Please sign in to comment.