OSDN Git Service

catch error
authorxuhongxin <xuhongxin@luojilab.com>
Sat, 25 Aug 2018 11:47:28 +0000 (19:47 +0800)
committerxuhongxin <xuhongxin@luojilab.com>
Sat, 25 Aug 2018 11:47:28 +0000 (19:47 +0800)
src/content/index.js

index 6562308..37a5329 100644 (file)
@@ -12,6 +12,8 @@ const client = new bytom(url, accessToken)
 const keyPromise = client.keys.create('alias', 'password')
 keyPromise.then(key => {
     console.log(key)
+}).catch(function(error){
+    console.log(error)
 })
 
 //accounts list