Open BadCoder1337 opened 4 years ago
Resolving/Rejecting is a promise core feature. With that you can use trycatch in async contexts. instead return { error, msg: 'Device does not exist' } use throw { error, msg: 'Device does not exist' }
return { error, msg: 'Device does not exist' }
throw { error, msg: 'Device does not exist' }
Resolving/Rejecting is a promise core feature. With that you can use trycatch in async contexts. instead
return { error, msg: 'Device does not exist' }
usethrow { error, msg: 'Device does not exist' }