raise PunchdError for errors from punchd

This commit is contained in:
Christian Ulrich 2020-08-27 00:06:51 +02:00
parent 006ec73361
commit 9b2e72d7dc
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ proc handlePunchdMessages(conn: PunchdConnection) {.async.} =
of "error":
let outMsg = conn.outMessages[args[1]]
conn.outMessages.del(args[1])
outMsg.future.fail(newException(ServerError, args[2]))
outMsg.future.fail(newException(PunchdError, args[2]))
of "progress":
let outMsg = conn.outMessages[args[1]]
asyncCheck outMsg.progressCb(outMsg.future, args[2])