Skip to content

Releases: browserstack/chitragupta-node

v.1.7.5

19 Jan 06:16
e72239a

Choose a tag to compare

Task: link

Added headers in the server logs and limited it to 1000 characters

Force check and typecast params to string before truncating

09 Jan 09:25
d16a08a

Choose a tag to compare

In v1.7.3 we had faced an issue wherein there were 2 scenarios when the package was breaking.

  • When the data.request.params were null/empty as they were absent itself
  • When the data.request.params were 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)

08 Jan 08:15
da50610

Choose a tag to compare

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