Releases: browserstack/chitragupta-node
Releases · browserstack/chitragupta-node
v.1.7.5
Force check and typecast params to string before truncating
In v1.7.3 we had faced an issue wherein there were 2 scenarios when the package was breaking.
- When the
data.request.paramswere null/empty as they were absent itself - When the
data.request.paramswere passed as dictionary from the package itself
In both the cases, the .substring() was breaking with below traceback
Running in production mode │
│ {"data":{},"log":{"dynamic_data":"listening to port 3000","kind":"listening to port 3000","level":"info"},"meta":{"format":{"category":"server","version":5},"timestamp":"2024-01-08T16:28:17.933Z"}} │
│ /app/src/node_modules/chitragupta/lib/chitragupta/util.js:37 │
│ data.data.request.params = data.data.request.params.substring(0, fieldLimits.PARAMS) || true; │
│ ^ │
│ │
│ TypeError: Cannot read properties of undefined (reading 'substring')
Hence as part of this release we have force typecasted the data.request.params to string when it's an dictionary type and kept it's fallback value as empty string.
PR: #26
Modified field limits for CG fields (dynamic_data, headers, params)
Spec: https://browserstack.atlassian.net/wiki/spaces/ENG/pages/4039344275/CG+log+limits+over+text+fields
Task: https://browserstack.atlassian.net/browse/DATA-7483
This release is for adding limits to CG fields which are of text types.
dynamic_data = 5000 characters
headers = 1000 characters
params = 10000 characters