Update dependencies, log errors as errors.

This commit is contained in:
2023-02-25 14:56:27 -07:00
parent 3d2f52ee1d
commit 3b1e9b5a8d
2 changed files with 8 additions and 6 deletions

View File

@ -76,8 +76,8 @@ proc makeDataBody*(
proc makeStatusBody*(details: string): JsonNode = %*{"details":details}
template sendErrorResp*(err: ref ApiError, knownOrigins: seq[string]): void =
log().debug err.respMsg & ( if err.msg.len > 0: ": " & err.msg else: "")
if not err.parent.isNil: log().debug " original exception: " & err.parent.msg
log().error err.respMsg & ( if err.msg.len > 0: ": " & err.msg else: "")
if not err.parent.isNil: log().error " original exception: " & err.parent.msg
sendJsonResp(makeStatusBody(err.respMsg), err.respCode, knownOrigins, @{:})
## CORS support