Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. }).catch((err) => {
  2. switch(err.message) {
  3. case 'NOT_ENOUGH_ITEMS':
  4. return res.status(400).json("Not enough items on market.")
  5. case 'INSUFFICIENT_FUNDS':
  6. return res.status(400).json("Insufficient funds.")
  7. case 'BUYING_OWN_EQUIPMENT':
  8. return res.status(400).json("You can't buy your own item.")
  9. default:
  10. console.log(err)
  11. return res.status(400).json('Unexpected error, please contact an administrator')
  12. }
  13. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement