Better error (used to show up as [Object object])
This commit is contained in:
parent
37a466f9f3
commit
d95620096a
1 changed files with 27 additions and 3 deletions
|
|
@ -335,7 +335,15 @@ const authenticate = async (alias, pass, __user) => {
|
|||
},
|
||||
ack => {
|
||||
if (ack.err && typeof ack.err !== 'number') {
|
||||
rej(new Error(`Error initializing follows: ${ack.err}`))
|
||||
rej(
|
||||
new Error(
|
||||
`Error initializing follows: ${JSON.stringify(
|
||||
ack.err,
|
||||
null,
|
||||
4
|
||||
)}`
|
||||
)
|
||||
)
|
||||
} else {
|
||||
res()
|
||||
}
|
||||
|
|
@ -366,7 +374,15 @@ const authenticate = async (alias, pass, __user) => {
|
|||
},
|
||||
ack => {
|
||||
if (ack.err && typeof ack.err !== 'number') {
|
||||
rej(new Error(`Error initializing follows: ${ack.err}`))
|
||||
rej(
|
||||
new Error(
|
||||
`Error initializing follows: ${JSON.stringify(
|
||||
ack.err,
|
||||
null,
|
||||
4
|
||||
)}`
|
||||
)
|
||||
)
|
||||
} else {
|
||||
res()
|
||||
}
|
||||
|
|
@ -417,7 +433,15 @@ const authenticate = async (alias, pass, __user) => {
|
|||
},
|
||||
ack => {
|
||||
if (ack.err && typeof ack.err !== 'number') {
|
||||
rej(new Error(`Error initializing follows: ${ack.err}`))
|
||||
rej(
|
||||
new Error(
|
||||
`Error initializing follows: ${JSON.stringify(
|
||||
ack.err,
|
||||
null,
|
||||
4
|
||||
)}`
|
||||
)
|
||||
)
|
||||
} else {
|
||||
res()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue