expressjs / api-error-handler

Express error handlers for JSON APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suppress `stack` in test environment

n-sviridenko opened this issue · comments

Hi guys. Can we do this? Otherwise tests become messy.

if (process.env.NODE_ENV === "test") {
  // no `stack` in the response
}