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

[Request] When using post response variables, the actual response of the request should be returned even if the var fails to be set #2005

Open
prwnr opened this issue Apr 4, 2024 · 0 comments · May be fixed by #2324
Labels
enhancement New feature or request

Comments

@prwnr
Copy link

prwnr commented Apr 4, 2024

Problem

Currently when we have a post response variable configured, that expect a specific response format like res.body.data.id - it will fail whenever that particular format is not found.
There are cases where that format may be missing, for example due to expired token - that results with a different response from the API we call.
However, right now, with the variable configured, Bruno will show:
Error invoking remote method 'send-http-request': TypeError: Cannot read properties of undefined (reading 'id')
instead of the actual response. To see the actual response the only way is to disable the variables(s) and call the endpoint again.

This is how it looks in app:
image

Suggestion

When post response variables are in use, but the response does not return what the variable expects, it should still show the actual response. The error of the variable should be showed in a separate tab - similar to how test assertions are working - that a failed test does not replaces the response, but shows the information in a separate tab.

My apologies if this is somewhere mentioned already, but I couldnt find similar request with my search phrases.

@sanjai0py sanjai0py added the enhancement New feature or request label Apr 9, 2024
rbideau added a commit to rbideau/bruno that referenced this issue May 16, 2024
fix usebruno#2005

- display post request variable evaluation errors in a toast, each individual variable error on a new line
- display the response body (was previously replaced by the an error "Error invoking remote method 'send-http-request': ..."
@rbideau rbideau linked a pull request May 16, 2024 that will close this issue
5 tasks
rbideau added a commit to rbideau/bruno that referenced this issue May 22, 2024
fix usebruno#2005

- display post request variable evaluation errors in a toast, each individual variable error on a new line
- display the response body (was previously replaced by the an error "Error invoking remote method 'send-http-request': ..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants