rcos / observatory-server

A project tracking dashboard for Rensselaer Center for Open Source
https://rcos.io
MIT License
14 stars 51 forks source link

Improve code quality in API helpers.js #726

Closed aeksco closed 6 years ago

aeksco commented 6 years ago

Update the handleError function to return { error: err } and set status manually, like so:

// Return a standard error
export const handleError = (res, err) => {
  return res.status(500).json({ error: err }).end()
}

Repeat this process for the validationError function.

Additionally:

aeksco commented 6 years ago

Resolved