not a CatchableError

This commit is contained in:
Ștefan Talpalaru 2020-01-13 18:53:59 +01:00
parent 931071e4de
commit 468e0815b3
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9

View File

@ -188,7 +188,7 @@ proc sendErrorResponse(peer: Peer,
let responseBytes = encodeErrorMsg(InvalidRequest, err.formatMsg("msg"))
await stream.writeAllBytes(responseBytes)
await stream.close()
except CatchableError as err:
except Exception as err:
debug "Error during sendErrorResponse()", error = err.msg
proc sendErrorResponse(peer: Peer,
@ -201,7 +201,7 @@ proc sendErrorResponse(peer: Peer,
let responseBytes = encodeErrorMsg(ServerError, errMsg)
await stream.writeAllBytes(responseBytes)
await stream.close()
except CatchableError as err:
except Exception as err:
debug "Error during sendErrorResponse()", error = err.msg
proc sendNotificationMsg(peer: Peer, protocolId: string, requestBytes: Bytes) {.async} =