daily pastebin goal


a guest Jun 19th, 2017 49 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand