Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Show Response Payload in Timeline in case of Post-Response Error #1518

Open
muya opened this issue Feb 5, 2024 · 3 comments · May be fixed by #1662
Open

[Feature Request] Show Response Payload in Timeline in case of Post-Response Error #1518

muya opened this issue Feb 5, 2024 · 3 comments · May be fixed by #1662

Comments

@muya
Copy link

muya commented Feb 5, 2024

Scenario

Take this Bruno Request as an example:

meta {  
  name: HTTP Bin Get Anything  
  type: http  
  seq: 3  
}  
  
post {  
  url: https://httpbin.org/anything  
  body: json  
  auth: none  
}  
  
headers {  
  accept: application/json  
}  
  
body:json {  
  {  
    "test": "hello Bruno"  
  }  
}  
  
vars:post-response {  
  unknown_field: res.body.arguments.unknown_field  
}

We are using httpbin.org to echo our request payload.

In the post response, we're attempting to set the value of unknown_field to a non-existent field (In a real use-case, this could be a result of an unexpected payload in the response).

Due to this configuration, we get the following error in the response tab:

Error invoking remote method 'send-http-request': TypeError: Cannot read properties of undefined (reading 'unknown_field')

This is expected because the response payload has no field named arguments.

In the Timeline tab, the following content is shown:

> POST https://httpbin.org/anything

> accept: application/json

> content-type: application/json

> data {"test":"hello Bruno"}

< Error

Feature Request

In this scenario, show the raw response payload in the "Timeline tab". This would make it easier to understand why the parsing of the response failed in post-response, without having to check the backend server for the response it sent back.

@pete-mantell-giffgaff
Copy link

Would it be possible as part of this request to include the timestamp as part of the raw output? The timeline currently does not display time at all

fredjeck added a commit to fredjeck/bruno that referenced this issue Feb 24, 2024
fredjeck added a commit to fredjeck/bruno that referenced this issue Mar 29, 2024
fredjeck added a commit to fredjeck/bruno that referenced this issue Mar 29, 2024
@rbideau
Copy link
Contributor

rbideau commented May 16, 2024

Similar to #2005

@rbideau
Copy link
Contributor

rbideau commented May 16, 2024

I've created #2324 to solve #2005

While it doesn't solve the problem as you expected (still doesn't show response payload in Timeline) it solves the problem of visualization the response payload when there is some errors when evaluation post response variables.

@muya Let me know if #2324 is also an acceptable solution for you and if it can also fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants