feat: improve stack traces for script and test failures (#7181)

* chore: update package-lock.json to include yaml dependency

* feat: add script-aware stack traces and source context for script/test failures

* chore: sync package-lock.json with yaml dependency in bruno-js

* fix: handle null check in getErrorTypeName and align JSDoc style

* refactor: derive script path from request.pathname and use SCRIPT_TYPES constant

* fix: avoid showing source context for collection/folder script errors

* feat: map collection/folder script errors to source file and line

* fix: update error formatting and avoid undefined message

* fix: resolve script block location in collection/folder yml files

* refactor: use script wrapper utils and rename wrapper offsets

* refactor: move script wrapper to utils, add wrapScriptInClosure fn
This commit is contained in:
gopu-bruno
2026-03-02 15:27:18 +05:30
committed by GitHub
parent 4797abbeff
commit 910581a627
17 changed files with 1140 additions and 84 deletions

View File

@@ -42,6 +42,7 @@ const prepareRequest = async (item = {}, collection = {}) => {
url: request.url,
headers: headers,
name: item.name,
pathname: item.pathname,
tags: item.tags || [],
pathParams: request.params?.filter((param) => param.type === 'path'),
settings: item.settings,
@@ -398,6 +399,7 @@ const prepareRequest = async (item = {}, collection = {}) => {
if (request.tests) {
axiosRequest.tests = request.tests;
axiosRequest.testsMetadata = request.testsMetadata;
}
axiosRequest.vars = request.vars;