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

Doesn't support arrays of paths since Express 4.16.4, "Pipe character bug fix" #4

Description

@Mattsi-Jansky

Since Express 4.x it has been valid syntax to use an array for a path, ie app.get(['/','/login'], ...). Since the pipe character bug fix was added in 0.0.7 this results in the following bug when the connect-datadog middleware gets called:

TypeError: str.replace is not a function
    at replacePipeChar (/usr/src/app/node_modules/connect-datadog/lib/index.js:27:21)
    at ServerResponse.res.end (/usr/src/app/node_modules/connect-datadog/lib/index.js:46:39)
    at ServerResponse.send (/usr/src/app/node_modules/express/lib/response.js:221:10)

It fails in the replacePipeChar function because it assumes that req.route.path will be a string, but it is actually an an array.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions