Skip to content

Conversation

@trentm
Copy link
Member

@trentm trentm commented Aug 10, 2022

Fixes: #2030


Example of the tests failing without the fix:

...
# #attributesFromErr()
# no attrs
ok 39 got expected attrs
# string attr
ok 40 got expected attrs
# Invalid Date attr
/Users/trentm/el/apm-agent-nodejs6/lib/errors.js:99
          val = val.toISOString()
                    ^

RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at attributesFromErr (/Users/trentm/el/apm-agent-nodejs6/lib/errors.js:99:21)
    at Test.<anonymous> (/Users/trentm/el/apm-agent-nodejs6/test/errors.test.js:366:21)
    at Test.bound [as _cb] (/Users/trentm/el/apm-agent-nodejs6/node_modules/tape/lib/test.js:99:32)
    at Test.run (/Users/trentm/el/apm-agent-nodejs6/node_modules/tape/lib/test.js:117:31)
    at Test.bound [as run] (/Users/trentm/el/apm-agent-nodejs6/node_modules/tape/lib/test.js:99:32)
    at Test._end (/Users/trentm/el/apm-agent-nodejs6/node_modules/tape/lib/test.js:220:11)
    at Test.bound [as _end] (/Users/trentm/el/apm-agent-nodejs6/node_modules/tape/lib/test.js:99:32)
    at Test.<anonymous> (/Users/trentm/el/apm-agent-nodejs6/node_modules/tape/lib/test.js:219:40)
    at Test.emit (node:events:527:28)

and they pass after.

@trentm trentm self-assigned this Aug 10, 2022
@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label Aug 10, 2022
@ghost
Copy link

ghost commented Aug 10, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-08-10T22:10:26.374+0000

  • Duration: 21 min 51 sec

Test stats 🧪

Test Results
Failed 0
Passed 258342
Skipped 0
Total 258342

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run module tests for <modules> : Run TAV tests for one or more modules, where <modules> can be either a comma separated list of modules (e.g. memcached,redis) or the string literal ALL to test all modules

  • run benchmark tests : Run the benchmark test only.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@trentm trentm marked this pull request as ready for review August 10, 2022 22:44
@trentm trentm requested a review from astorm August 10, 2022 22:44
@trentm trentm merged commit 307f314 into main Aug 11, 2022
@trentm trentm deleted the trentm/capture-error-with-invalid-date branch August 11, 2022 18:30
PeterEinberger pushed a commit to fpm-git/apm-agent-nodejs that referenced this pull request Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-nodejs Make available for APM Agents project planning.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Capturing an error object with a field of type Date with value Invalid Date causes an error

3 participants