IntersectMBO / IntersectMBO/govtool
[backend] : Verbose error logging when requesting metadata service
- Dominant language
- HTML
- Stars
- 21
- Forks
- 29
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 7
Description
## Why
Better debugging of issues
## What
Verbose logging
## How
Current Sample Log:
```
Exception InternalError "Failed to validate metadata"
while handling request
Request {requestMethod = "GET", httpVersion = HTTP/1.1, rawPathInfo = "/drep/list", rawQueryString = "",
requestHeaders = [("Host","govtool.cardanoapi.io"),("X-Real-IP","xxx.xxx.xxx.xxx"),("X-Forwarded-For","xxx.xxx.xxx.xxx"),
("X-Forwarded-Proto","https"),("X-Forwarded-Ssl","on"),("X-Forwarded-Port","443"),("Connection","close"),("User-Agent","python-requests/2.31.0"),("Accept-Encoding","gzip, deflate"),("Accept","application/json"),
("content-type","application/json")],
isSecure = False, remoteHost = 10.0.28.118:34684,
pathInfo = ["drep","list"], queryString = [], requestBody = ,
vault = , requestBodyLength = KnownLength 0, requestHeaderHost = Just "govtool.cardanoapi.io",
requestHeaderRange = Nothing}
```
The above log is not sufficient to detect the error source.
The log should indicate the type of error
e.g. "Connection failed", "Timeout", "Invalid Status Code", "Invalid response format" or what is relevant to the error.
and have sufficient information to further investigate the source of error.
Contributor guide
Assessment
This issue has not been assessed yet.