Bugfix: guard NPE in ApiError creation.
This commit is contained in:
@ -10,7 +10,9 @@ proc newApiError*(parent: ref Exception = nil, respCode: HttpCode, respMsg: stri
|
||||
result = newException(ApiError, msg, parent)
|
||||
result.respCode = respCode
|
||||
result.respMsg = respMsg
|
||||
result.trace &= parent.trace
|
||||
|
||||
if not parent.isNil:
|
||||
result.trace &= parent.trace
|
||||
|
||||
|
||||
proc raiseApiError*(respCode: HttpCode, respMsg: string, msg = "") =
|
||||
|
Reference in New Issue
Block a user