You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
Given the nature of the change, this will not be an easy fix. We need a way to find out which of the routes in the array was matched and this means quite a big change to the library.
In the meantime, it should be possible to work around the issue by splitting the app.get in 2 different calls. For example:
Since Express
4.x
it has been valid syntax to use an array for a path, ieapp.get(['/','/login'], ...)
. Since the pipe character bug fix was added in0.0.7
this results in the following bug when theconnect-datadog
middleware gets called:It fails in the
replacePipeChar
function because it assumes thatreq.route.path
will be a string, but it is actually an an array.The text was updated successfully, but these errors were encountered: