How to use the gatsby-cli/lib/reporter.error function in gatsby-cli

To help you get started, we’ve selected a few gatsby-cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gatsbyjs / gatsby / packages / gatsby / src / commands / develop.ts View on Github external
.on(`error`, (err, _, response) => {
              if (response) {
                res.writeHead(response.statusCode!, response.headers)
              } else {
                const message = `Error when trying to proxy request "${req.originalUrl}" to "${proxiedUrl}"`

                report.error(message, err)
                res.sendStatus(500)
              }
            })
        )