[api] print raw storage request to trace log

This commit is contained in:
Eric 2023-07-31 15:52:00 +10:00
parent 1b658b2293
commit dd67b74819
No known key found for this signature in database

View File

@ -196,6 +196,8 @@ proc initRestApi*(node: CodexNodeRef, conf: CodexConf): RestRouter =
let body = await request.getBody()
trace "storage request received", body = string.fromBytes(body)
without params =? StorageRequestParams.fromJson(body), error:
return RestApiResponse.error(Http400, error.msg)