Update dependencies, log errors as errors.
This commit is contained in:
parent
3d2f52ee1d
commit
3b1e9b5a8d
@ -1,8 +1,8 @@
|
||||
# Package
|
||||
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
author = "Jonathan Bernard"
|
||||
description = "JDB Software's opinionated extensions and auth layer for Jester."
|
||||
description = "Jonathan's opinionated extensions and auth layer for Jester."
|
||||
license = "MIT"
|
||||
srcDir = "src"
|
||||
|
||||
@ -10,10 +10,12 @@ srcDir = "src"
|
||||
# Dependencies
|
||||
|
||||
requires "nim >= 1.6.2"
|
||||
|
||||
# from standard nimble repo
|
||||
requires @["bcrypt", "jester >= 0.5.0", "uuids"]
|
||||
|
||||
requires "https://git.jdb-software.com/jdb/nim-jwt-full.git >= 0.2.0"
|
||||
requires "https://git.jdb-software.com/jdb/nim-namespaced-logging.git >= 0.3.0"
|
||||
# from https://git.jdb-software.com/jdb/nim-packages
|
||||
requires @["jwt_full >= 0.2.0", "namespaced_logging >= 0.3.0"]
|
||||
|
||||
task unittest, "Runs the unit test suite.":
|
||||
exec "nim c -r test/runner"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user