Skip to content

Commit 238d6ba

Browse files
committed
fix(cursor): A better error message in JsonCursor.
Print the source JSON string in the error message.
1 parent 9951588 commit 238d6ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cursor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ impl<T> JsonCursor<T> {
203203
match serde_json::from_str(workaround_51132(line)) {
204204
Ok(JsonRow::Row(value)) => return Ok(Some(value)),
205205
Ok(JsonRow::Progress { .. }) => continue,
206-
Err(err) => return Err(Error::BadResponse(err.to_string())),
206+
Err(err) => return Err(Error::BadResponse(format!("{err} in {line:?}"))),
207207
}
208208
}
209209

0 commit comments

Comments
 (0)