Bugfix: guard NPE in ApiError creation.
This commit is contained in:
parent
c75c973350
commit
e4c7524d3d
@ -1,6 +1,6 @@
|
|||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "0.4.4"
|
version = "0.4.5"
|
||||||
author = "Jonathan Bernard"
|
author = "Jonathan Bernard"
|
||||||
description = "Jonathan's opinionated extensions and auth layer for Jester."
|
description = "Jonathan's opinionated extensions and auth layer for Jester."
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -10,6 +10,8 @@ proc newApiError*(parent: ref Exception = nil, respCode: HttpCode, respMsg: stri
|
|||||||
result = newException(ApiError, msg, parent)
|
result = newException(ApiError, msg, parent)
|
||||||
result.respCode = respCode
|
result.respCode = respCode
|
||||||
result.respMsg = respMsg
|
result.respMsg = respMsg
|
||||||
|
|
||||||
|
if not parent.isNil:
|
||||||
result.trace &= parent.trace
|
result.trace &= parent.trace
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user