Open dcoomber opened 1 year ago
@dcoomber We should throw an error when a script is trying to access an element inside the response which is not present right ? If we don't catch these errors, then the further steps around retrieve the booking would fail.
I may be missing your intent/reasoning here. Can you elaborate on why you think that the script should not throw error in case of an out-of-bounds or invalid-index access ?
I'm looking at this from the perspective of winning over users by making sure that the behaviour is somewhat similar to their experience in Postman. Postman does not show an error to the user for the same condition.
That said, showing the exception to the user is less of an issue than the content of the toast message - not all of our users will be technical.
It took me a moment to figure out that the issue was not in the HTTP request, but rather in processing of the response in the post response script. I think that the user experience for less technical users could be improved by either not showing the exception or by using user-friendly text.
I am in agreement that we should not throw the error in the response pane, but have it displayed separately. This the current behaviour today on v1.25.0 as on 23 Nov 2025
This is definitely not a good UX. @lohxt1 @anusree-bruno lets have this addressed in the new debug console that we are building.
The request includes a script that retrieves the first element in the response array for use as a collection variable in later requests.
The following toast exception is displayed:
which relates to the request script:
Steps to reproduce
Using this collection: https://github.com/dcoomber/exploring-bruno/tree/dpc_session_1/exploration/02-create/EE%20Bookings
Toast exception is displayed
Expected result
The "failing" script statement is ignored. No toast exception is displayed. The collection variable is left in its previous state / value.
Please also test the fix in the case where referencing an element out-of-bounds in a non-empty array response.