diff --git a/packages/collector/test/tracing/database/mongodb/app.mjs b/packages/collector/test/tracing/database/mongodb/app.mjs index c8f2833cf2..66c5b48c14 100644 --- a/packages/collector/test/tracing/database/mongodb/app.mjs +++ b/packages/collector/test/tracing/database/mongodb/app.mjs @@ -230,7 +230,7 @@ app.post('/long-find', (req, res) => { // Execute another traced call to verify that we keep the tracing context. return fetch(`http://127.0.0.1:${agentPort}?call=${call}`); }) - .then(() => res.json(mongoResponse)) + .then(() => res.json(mongoResponse || {})) .catch(e => { log('Failed to find document', e); res.sendStatus(500);