Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

TypeError: str.replace is not a functionΒ #14

Open
@stieg

Description

@stieg

According to https://expressjs.com/en/4x/api.html#app.get the path parameter can be a string, regexp or array containing any of the above. It would appear that if the path is an array it will cause the following unhandled exception:

TypeError: str.replace is not a function
    at replacePipeChar (/home/stieg/Devel/airfordable/af-beta/node_modules/connect-datadog/lib/index.js:27:21)
    at getRoute (/home/stieg/Devel/airfordable/af-beta/node_modules/connect-datadog/lib/index.js:33:20)
    at ServerResponse.res.end (/home/stieg/Devel/airfordable/af-beta/node_modules/connect-datadog/lib/index.js:48:18)
    at ServerResponse.res.end (/home/stieg/Devel/airfordable/af-beta/node_modules/express-winston/index.js:316:17)
    at Gzip.onStreamEnd (/home/stieg/Devel/airfordable/af-beta/node_modules/compression/index.js:212:14)
    at Gzip.emit (events.js:214:15)
    at Gzip.EventEmitter.emit (domain.js:476:20)
    at endReadableNT (_stream_readable.js:1178:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions