Skip to content

Commit

Permalink
Print errors
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Aug 28, 2024
1 parent 60def8d commit 2729918
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion integration-tests/helpers/fake-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,22 @@ function buildExpressServer (agent) {

app.post('/v0.7/config', (req, res) => {
const {
client: { products },
client: { products, state },
cached_target_files: cachedTargetFiles
} = req.body

if (state.has_error) {
// Print the error sent by the client in case it's useful in debugging tests
console.error(state.error) // eslint-disable-line no-console
}

for (const { apply_error: error } of state.config_states) {
if (error) {
// Print the error sent by the client in case it's useful in debugging tests
console.error(error) // eslint-disable-line no-console
}
}

// The actual targets object is much more complicated,
// but the Node.js tracer currently only cares about the following properties.
const targets = {
Expand Down

0 comments on commit 2729918

Please sign in to comment.