Skip to content

Commit

Permalink
trace jq output and original input
Browse files Browse the repository at this point in the history
  • Loading branch information
maggie98choy committed Aug 13, 2024
1 parent 9685d99 commit df6c1e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/main/src/broker/endpoint_broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,15 @@ fn apply_response(
format!("{}_response", rpc_request.ctx.method),
) {
Ok(r) => {
ripple_sdk::log::trace!(
"jq rendered output {:?} original input {:?} for filter {}",
r,
v,
result_response_filter
);
/*
weird corner case where the filter is "then \"null\"" which is a jq way to return null
*/
if r.to_string().to_lowercase().contains("null") {
v.data.result = Some(Value::Null);
v.data.error = None;
Expand Down

0 comments on commit df6c1e1

Please sign in to comment.