SHARE
TWEET

Untitled

a guest Jun 19th, 2017 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.         })
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top