Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALS Logs print really really really long errors, making it difficult to debug #2017

Closed
Tracked by #2151
lewisdaly opened this issue Feb 9, 2021 · 3 comments
Closed
Tracked by #2151
Assignees
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it triaged This bug has been triaged by the triage team!
Milestone

Comments

@lewisdaly
Copy link
Contributor

lewisdaly commented Feb 9, 2021

Summary:
In the ALS, sometimes incredibly long errors are printed, making it very hard to debug issues (see below).

We should be printing error messages that only a few lines long, not the serializing the entire error object and printing it.

Severity:
(Low, Medium, High)

Priority:
(Critical, Medium, Low)

Expected Behavior

  • Errors should be printed with sufficent detail, but not anywhere near as many lines.

Steps to Reproduce

  1. Do something that causes an error in the ALS (e.g. GET /participants with an FSPIOP-Origin header that isn't registered, which will cause a failure to lookup endpoints`
  2. Inspect the logs. E.g.:
2021-02-09T04:58:36.982Z - info: sendRequest::request {"url":"http://central-ledger:3001/participants/dfspa","method":"GET","headers":{"accept":"application/vnd.interoperability.participants+json;version=1","FSPIOP-Destination":"switch","Content-Type":"application/vnd.interoperability.participants+json;version=1.0","date":"Tue, 09 Feb 2021 04:58:36 GMT","FSPIOP-Source":"switch","traceparent":"00-87082f7a42d576905659a6e7868ade0e-ac995039c148b4fc-00","tracestate":"acmevendor=eyJzcGFuSWQiOiJhYzk5NTAzOWMxNDhiNGZjIn0="},"data":null,"responseType":"json"}
2021-02-09T04:58:36.986Z - error: Request failed with status code 400
2021-02-09T04:58:36.989Z - error: {
  "type": "application/json",
  "id": "b8a61928-e8a4-4713-a022-8314ec1a5ba3",
  "content": {
    "error": {
      "name": "FSPIOPError",
      "cause": {
        "config": {
          "url": "http://central-ledger:3001/participants/dfspa",
          "method": "get",
          "data": null,
          "headers": {
            "FSPIOP-Destination": "switch",
            "Content-Type": "application/vnd.interoperability.participants+json;version=1.0",
            "date": "Tue, 09 Feb 2021 04:58:36 GMT",
            "FSPIOP-Source": "switch",
            "traceparent": "00-87082f7a42d576905659a6e7868ade0e-ac995039c148b4fc-00",
            "tracestate": "acmevendor=eyJzcGFuSWQiOiJhYzk5NTAzOWMxNDhiNGZjIn0=",
            "Accept": "application/vnd.interoperability.participants+json;version=1",
            "User-Agent": "axios/0.21.1"
          },
          "transformRequest": [],
          "transformResponse": [],
          "timeout": 0,
          "responseType": "json",
          "xsrfCookieName": "XSRF-TOKEN",
          "xsrfHeaderName": "X-XSRF-TOKEN",
          "maxContentLength": -1,
          "maxBodyLength": -1
        },
        "request": {
          "_events": {},
          "_eventsCount": 7,
          "outputData": [],
          "outputSize": 0,
          "writable": true,
          "_last": true,
          "chunkedEncoding": false,
          "shouldKeepAlive": false,
          "useChunkedEncodingByDefault": false,
          "sendDate": false,
          "_removedConnection": false,
          "_removedContLen": false,
          "_removedTE": false,
          "_contentLength": 0,
          "_hasBody": true,
          "_trailer": "",
          "finished": true,
          "_headerSent": true,
          "socket": {
            "connecting": false,
            "_hadError": false,
            "_parent": null,
            "_host": "central-ledger",
            "_readableState": {
              "objectMode": false,
              "highWaterMark": 16384,
              "buffer": {
                "head": null,
                "tail": null,
                "length": 0
              },
              "length": 0,
              "pipes": null,
              "pipesCount": 0,
              "flowing": true,
              "ended": false,
              "endEmitted": false,
              "reading": true,
              "sync": false,
              "needReadable": true,
              "emittedReadable": false,
              "readableListening": false,
              "resumeScheduled": false,
              "emitClose": false,
              "autoDestroy": false,
              "destroyed": false,
              "defaultEncoding": "utf8",
              "awaitDrain": 0,
              "readingMore": false,
              "decoder": null,
              "encoding": null
            },
            "readable": true,
            "_events": {
              "close": []
            },
            "_eventsCount": 6,
            "_writableState": {
              "objectMode": false,
              "highWaterMark": 16384,
              "finalCalled": true,
              "needDrain": false,
              "ending": true,
              "ended": true,
              "finished": false,
              "destroyed": false,
              "decodeStrings": false,
              "defaultEncoding": "utf8",
              "length": 0,
              "writing": false,
              "corked": 0,
              "sync": false,
              "bufferProcessing": false,
              "writecb": null,
              "writelen": 0,
              "afterWriteTickInfo": null,
              "bufferedRequest": null,
              "lastBufferedRequest": null,
              "pendingcb": 1,
              "prefinished": false,
              "errorEmitted": false,
              "emitClose": false,
              "autoDestroy": false,
              "bufferedRequestCount": 0,
              "corkedRequestsFree": {
                "next": null,
                "entry": null
              }
            },
            "writable": false,
            "allowHalfOpen": false,
            "_sockname": null,
            "_pendingData": null,
            "_pendingEncoding": "",
            "server": null,
            "_server": null,
            "parser": null,
            "_httpMessage": "[Circular]"
          },
          "connection": {
            "connecting": false,
            "_hadError": false,
            "_parent": null,
            "_host": "central-ledger",
            "_readableState": {
              "objectMode": false,
              "highWaterMark": 16384,
              "buffer": {
                "head": null,
                "tail": null,
                "length": 0
              },
              "length": 0,
              "pipes": null,
              "pipesCount": 0,
              "flowing": true,
              "ended": false,
              "endEmitted": false,
              "reading": true,
              "sync": false,
              "needReadable": true,
              "emittedReadable": false,
              "readableListening": false,
              "resumeScheduled": false,
              "emitClose": false,
              "autoDestroy": false,
              "destroyed": false,
              "defaultEncoding": "utf8",
              "awaitDrain": 0,
              "readingMore": false,
              "decoder": null,
              "encoding": null
            },
            "readable": true,
            "_events": {
              "close": []
            },
            "_eventsCount": 6,
            "_writableState": {
              "objectMode": false,
              "highWaterMark": 16384,
              "finalCalled": true,
              "needDrain": false,
              "ending": true,
              "ended": true,
              "finished": false,
              "destroyed": false,
              "decodeStrings": false,
              "defaultEncoding": "utf8",
              "length": 0,
              "writing": false,
              "corked": 0,
              "sync": false,
              "bufferProcessing": false,
              "writecb": null,
              "writelen": 0,
              "afterWriteTickInfo": null,
              "bufferedRequest": null,
              "lastBufferedRequest": null,
              "pendingcb": 1,
              "prefinished": false,
              "errorEmitted": false,
              "emitClose": false,
              "autoDestroy": false,
              "bufferedRequestCount": 0,
              "corkedRequestsFree": {
                "next": null,
                "entry": null
              }
            },
            "writable": false,
            "allowHalfOpen": false,
            "_sockname": null,
            "_pendingData": null,
            "_pendingEncoding": "",
            "server": null,
            "_server": null,
            "parser": null,
            "_httpMessage": "[Circular]"
          },
          "_header": "GET /participants/dfspa HTTP/1.1\r\nFSPIOP-Destination: switch\r\nContent-Type: application/vnd.interoperability.participants+json;version=1.0\r\ndate: Tue, 09 Feb 2021 04:58:36 GMT\r\nFSPIOP-Source: switch\r\ntraceparent: 00-87082f7a42d576905659a6e7868ade0e-ac995039c148b4fc-00\r\ntracestate: acmevendor=eyJzcGFuSWQiOiJhYzk5NTAzOWMxNDhiNGZjIn0=\r\nAccept: application/vnd.interoperability.participants+json;version=1\r\nUser-Agent: axios/0.21.1\r\nHost: central-ledger:3001\r\nConnection: close\r\n\r\n",
          "agent": {
            "_events": {},
            "_eventsCount": 2,
            "defaultPort": 80,
            "protocol": "http:",
            "options": {
              "path": null
            },
            "requests": {},
            "sockets": {
              "central-ledger:3001:": [
                {
                  "connecting": false,
                  "_hadError": false,
                  "_parent": null,
                  "_host": "central-ledger",
                  "_readableState": {
                    "objectMode": false,
                    "highWaterMark": 16384,
                    "buffer": {
                      "head": null,
                      "tail": null,
                      "length": 0
                    },
                    "length": 0,
                    "pipes": null,
                    "pipesCount": 0,
                    "flowing": true,
                    "ended": false,
                    "endEmitted": false,
                    "reading": true,
                    "sync": false,
                    "needReadable": true,
                    "emittedReadable": false,
                    "readableListening": false,
                    "resumeScheduled": false,
                    "emitClose": false,
                    "autoDestroy": false,
                    "destroyed": false,
                    "defaultEncoding": "utf8",
                    "awaitDrain": 0,
                    "readingMore": false,
                    "decoder": null,
                    "encoding": null
                  },
                  "readable": true,
                  "_events": {
                    "close": []
                  },
                  "_eventsCount": 6,
                  "_writableState": {
                    "objectMode": false,
                    "highWaterMark": 16384,
                    "finalCalled": true,
                    "needDrain": false,
                    "ending": true,
                    "ended": true,
                    "finished": false,
                    "destroyed": false,
                    "decodeStrings": false,
                    "defaultEncoding": "utf8",
                    "length": 0,
                    "writing": false,
                    "corked": 0,
                    "sync": false,
                    "bufferProcessing": false,
                    "writecb": null,
                    "writelen": 0,
                    "afterWriteTickInfo": null,
                    "bufferedRequest": null,
                    "lastBufferedRequest": null,
                    "pendingcb": 1,
                    "prefinished": false,
                    "errorEmitted": false,
                    "emitClose": false,
                    "autoDestroy": false,
                    "bufferedRequestCount": 0,
                    "corkedRequestsFree": {
                      "next": null,
                      "entry": null
                    }
                  },
                  "writable": false,
                  "allowHalfOpen": false,
                  "_sockname": null,
                  "_pendingData": null,
                  "_pendingEncoding": "",
                  "server": null,
                  "_server": null,
                  "parser": null,
                  "_httpMessage": "[Circular]"
                }
              ]
            },
            "freeSockets": {},
            "keepAliveMsecs": 1000,
            "keepAlive": false,
            "maxSockets": null,
            "maxFreeSockets": 256
          },
          "method": "GET",
          "path": "/participants/dfspa",
          "_ended": true,
          "res": {
            "_readableState": {
              "objectMode": false,
              "highWaterMark": 16384,
              "buffer": {
                "head": null,
                "tail": null,
                "length": 0
              },
              "length": 0,
              "pipes": null,
              "pipesCount": 0,
              "flowing": true,
              "ended": true,
              "endEmitted": true,
              "reading": false,
              "sync": true,
              "needReadable": false,
              "emittedReadable": false,
              "readableListening": false,
              "resumeScheduled": false,
              "emitClose": true,
              "autoDestroy": false,
              "destroyed": false,
              "defaultEncoding": "utf8",
              "awaitDrain": 0,
              "readingMore": true,
              "decoder": null,
              "encoding": null
            },
            "readable": false,
            "_events": {
              "end": []
            },
            "_eventsCount": 3,
            "socket": {
              "connecting": false,
              "_hadError": false,
              "_parent": null,
              "_host": "central-ledger",
              "_readableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "buffer": {
                  "head": null,
                  "tail": null,
                  "length": 0
                },
                "length": 0,
                "pipes": null,
                "pipesCount": 0,
                "flowing": true,
                "ended": false,
                "endEmitted": false,
                "reading": true,
                "sync": false,
                "needReadable": true,
                "emittedReadable": false,
                "readableListening": false,
                "resumeScheduled": false,
                "emitClose": false,
                "autoDestroy": false,
                "destroyed": false,
                "defaultEncoding": "utf8",
                "awaitDrain": 0,
                "readingMore": false,
                "decoder": null,
                "encoding": null
              },
              "readable": true,
              "_events": {
                "close": []
              },
              "_eventsCount": 6,
              "_writableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "finalCalled": true,
                "needDrain": false,
                "ending": true,
                "ended": true,
                "finished": false,
                "destroyed": false,
                "decodeStrings": false,
                "defaultEncoding": "utf8",
                "length": 0,
                "writing": false,
                "corked": 0,
                "sync": false,
                "bufferProcessing": false,
                "writecb": null,
                "writelen": 0,
                "afterWriteTickInfo": null,
                "bufferedRequest": null,
                "lastBufferedRequest": null,
                "pendingcb": 1,
                "prefinished": false,
                "errorEmitted": false,
                "emitClose": false,
                "autoDestroy": false,
                "bufferedRequestCount": 0,
                "corkedRequestsFree": {
                  "next": null,
                  "entry": null
                }
              },
              "writable": false,
              "allowHalfOpen": false,
              "_sockname": null,
              "_pendingData": null,
              "_pendingEncoding": "",
              "server": null,
              "_server": null,
              "parser": null,
              "_httpMessage": "[Circular]"
            },
            "connection": {
              "connecting": false,
              "_hadError": false,
              "_parent": null,
              "_host": "central-ledger",
              "_readableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "buffer": {
                  "head": null,
                  "tail": null,
                  "length": 0
                },
                "length": 0,
                "pipes": null,
                "pipesCount": 0,
                "flowing": true,
                "ended": false,
                "endEmitted": false,
                "reading": true,
                "sync": false,
                "needReadable": true,
                "emittedReadable": false,
                "readableListening": false,
                "resumeScheduled": false,
                "emitClose": false,
                "autoDestroy": false,
                "destroyed": false,
                "defaultEncoding": "utf8",
                "awaitDrain": 0,
                "readingMore": false,
                "decoder": null,
                "encoding": null
              },
              "readable": true,
              "_events": {
                "close": []
              },
              "_eventsCount": 6,
              "_writableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "finalCalled": true,
                "needDrain": false,
                "ending": true,
                "ended": true,
                "finished": false,
                "destroyed": false,
                "decodeStrings": false,
                "defaultEncoding": "utf8",
                "length": 0,
                "writing": false,
                "corked": 0,
                "sync": false,
                "bufferProcessing": false,
                "writecb": null,
                "writelen": 0,
                "afterWriteTickInfo": null,
                "bufferedRequest": null,
                "lastBufferedRequest": null,
                "pendingcb": 1,
                "prefinished": false,
                "errorEmitted": false,
                "emitClose": false,
                "autoDestroy": false,
                "bufferedRequestCount": 0,
                "corkedRequestsFree": {
                  "next": null,
                  "entry": null
                }
              },
              "writable": false,
              "allowHalfOpen": false,
              "_sockname": null,
              "_pendingData": null,
              "_pendingEncoding": "",
              "server": null,
              "_server": null,
              "parser": null,
              "_httpMessage": "[Circular]"
            },
            "httpVersionMajor": 1,
            "httpVersionMinor": 1,
            "httpVersion": "1.1",
            "complete": true,
            "headers": {
              "content-type": "application/json; charset=utf-8",
              "cache-control": "no-cache",
              "content-length": "128",
              "date": "Tue, 09 Feb 2021 04:58:36 GMT",
              "connection": "close"
            },
            "rawHeaders": [
              "content-type",
              "application/json; charset=utf-8",
              "cache-control",
              "no-cache",
              "content-length",
              "128",
              "Date",
              "Tue, 09 Feb 2021 04:58:36 GMT",
              "Connection",
              "close"
            ],
            "trailers": {},
            "rawTrailers": [],
            "aborted": false,
            "upgrade": false,
            "url": "",
            "method": null,
            "statusCode": 400,
            "statusMessage": "Bad Request",
            "client": {
              "connecting": false,
              "_hadError": false,
              "_parent": null,
              "_host": "central-ledger",
              "_readableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "buffer": {
                  "head": null,
                  "tail": null,
                  "length": 0
                },
                "length": 0,
                "pipes": null,
                "pipesCount": 0,
                "flowing": true,
                "ended": false,
                "endEmitted": false,
                "reading": true,
                "sync": false,
                "needReadable": true,
                "emittedReadable": false,
                "readableListening": false,
                "resumeScheduled": false,
                "emitClose": false,
                "autoDestroy": false,
                "destroyed": false,
                "defaultEncoding": "utf8",
                "awaitDrain": 0,
                "readingMore": false,
                "decoder": null,
                "encoding": null
              },
              "readable": true,
              "_events": {
                "close": []
              },
              "_eventsCount": 6,
              "_writableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "finalCalled": true,
                "needDrain": false,
                "ending": true,
                "ended": true,
                "finished": false,
                "destroyed": false,
                "decodeStrings": false,
                "defaultEncoding": "utf8",
                "length": 0,
                "writing": false,
                "corked": 0,
                "sync": false,
                "bufferProcessing": false,
                "writecb": null,
                "writelen": 0,
                "afterWriteTickInfo": null,
                "bufferedRequest": null,
                "lastBufferedRequest": null,
                "pendingcb": 1,
                "prefinished": false,
                "errorEmitted": false,
                "emitClose": false,
                "autoDestroy": false,
                "bufferedRequestCount": 0,
                "corkedRequestsFree": {
                  "next": null,
                  "entry": null
                }
              },
              "writable": false,
              "allowHalfOpen": false,
              "_sockname": null,
              "_pendingData": null,
              "_pendingEncoding": "",
              "server": null,
              "_server": null,
              "parser": null,
              "_httpMessage": "[Circular]"
            },
            "_consuming": false,
            "_dumped": false,
            "req": "[Circular]",
            "responseUrl": "http://central-ledger:3001/participants/dfspa",
            "redirects": []
          },
          "aborted": false,
          "timeoutCb": null,
          "upgradeOrConnect": false,
          "parser": null,
          "maxHeadersCount": null,
          "reusedSocket": false,
          "_redirectable": {
            "_writableState": {
              "objectMode": false,
              "highWaterMark": 16384,
              "finalCalled": false,
              "needDrain": false,
              "ending": false,
              "ended": false,
              "finished": false,
              "destroyed": false,
              "decodeStrings": true,
              "defaultEncoding": "utf8",
              "length": 0,
              "writing": false,
              "corked": 0,
              "sync": true,
              "bufferProcessing": false,
              "writecb": null,
              "writelen": 0,
              "afterWriteTickInfo": null,
              "bufferedRequest": null,
              "lastBufferedRequest": null,
              "pendingcb": 0,
              "prefinished": false,
              "errorEmitted": false,
              "emitClose": true,
              "autoDestroy": false,
              "bufferedRequestCount": 0,
              "corkedRequestsFree": {
                "next": null,
                "entry": null
              }
            },
            "writable": true,
            "_events": {},
            "_eventsCount": 2,
            "_options": {
              "maxRedirects": 21,
              "maxBodyLength": 10485760,
              "protocol": "http:",
              "path": "/participants/dfspa",
              "method": "GET",
              "headers": {
                "FSPIOP-Destination": "switch",
                "Content-Type": "application/vnd.interoperability.participants+json;version=1.0",
                "date": "Tue, 09 Feb 2021 04:58:36 GMT",
                "FSPIOP-Source": "switch",
                "traceparent": "00-87082f7a42d576905659a6e7868ade0e-ac995039c148b4fc-00",
                "tracestate": "acmevendor=eyJzcGFuSWQiOiJhYzk5NTAzOWMxNDhiNGZjIn0=",
                "Accept": "application/vnd.interoperability.participants+json;version=1",
                "User-Agent": "axios/0.21.1"
              },
              "agents": {},
              "hostname": "central-ledger",
              "port": "3001",
              "nativeProtocols": {
                "http:": {
                  "METHODS": [
                    "ACL",
                    "BIND",
                    "CHECKOUT",
                    "CONNECT",
                    "COPY",
                    "DELETE",
                    "GET",
                    "HEAD",
                    "LINK",
                    "LOCK",
                    "M-SEARCH",
                    "MERGE",
                    "MKACTIVITY",
                    "MKCALENDAR",
                    "MKCOL",
                    "MOVE",
                    "NOTIFY",
                    "OPTIONS",
                    "PATCH",
                    "POST",
                    "PROPFIND",
                    "PROPPATCH",
                    "PURGE",
                    "PUT",
                    "REBIND",
                    "REPORT",
                    "SEARCH",
                    "SOURCE",
                    "SUBSCRIBE",
                    "TRACE",
                    "UNBIND",
                    "UNLINK",
                    "UNLOCK",
                    "UNSUBSCRIBE"
                  ],
                  "STATUS_CODES": {
                    "100": "Continue",
                    "101": "Switching Protocols",
                    "102": "Processing",
                    "103": "Early Hints",
                    "200": "OK",
                    "201": "Created",
                    "202": "Accepted",
                    "203": "Non-Authoritative Information",
                    "204": "No Content",
                    "205": "Reset Content",
                    "206": "Partial Content",
                    "207": "Multi-Status",
                    "208": "Already Reported",
                    "226": "IM Used",
                    "300": "Multiple Choices",
                    "301": "Moved Permanently",
                    "302": "Found",
                    "303": "See Other",
                    "304": "Not Modified",
                    "305": "Use Proxy",
                    "307": "Temporary Redirect",
                    "308": "Permanent Redirect",
                    "400": "Bad Request",
                    "401": "Unauthorized",
                    "402": "Payment Required",
                    "403": "Forbidden",
                    "404": "Not Found",
                    "405": "Method Not Allowed",
                    "406": "Not Acceptable",
                    "407": "Proxy Authentication Required",
                    "408": "Request Timeout",
                    "409": "Conflict",
                    "410": "Gone",
                    "411": "Length Required",
                    "412": "Precondition Failed",
                    "413": "Payload Too Large",
                    "414": "URI Too Long",
                    "415": "Unsupported Media Type",
                    "416": "Range Not Satisfiable",
                    "417": "Expectation Failed",
                    "418": "I'm a Teapot",
                    "421": "Misdirected Request",
                    "422": "Unprocessable Entity",
                    "423": "Locked",
                    "424": "Failed Dependency",
                    "425": "Unordered Collection",
                    "426": "Upgrade Required",
                    "428": "Precondition Required",
                    "429": "Too Many Requests",
                    "431": "Request Header Fields Too Large",
                    "451": "Unavailable For Legal Reasons",
                    "500": "Internal Server Error",
                    "501": "Not Implemented",
                    "502": "Bad Gateway",
                    "503": "Service Unavailable",
                    "504": "Gateway Timeout",
                    "505": "HTTP Version Not Supported",
                    "506": "Variant Also Negotiates",
                    "507": "Insufficient Storage",
                    "508": "Loop Detected",
                    "509": "Bandwidth Limit Exceeded",
                    "510": "Not Extended",
                    "511": "Network Authentication Required"
                  },
                  "maxHeaderSize": 8192,
                  "globalAgent": {
                    "_events": {},
                    "_eventsCount": 2,
                    "defaultPort": 80,
                    "protocol": "http:",
                    "options": {
                      "path": null
                    },
                    "requests": {},
                    "sockets": {
                      "central-ledger:3001:": [
                        {
                          "connecting": false,
                          "_hadError": false,
                          "_parent": null,
                          "_host": "central-ledger",
                          "_readableState": {
                            "objectMode": false,
                            "highWaterMark": 16384,
                            "buffer": {
                              "head": null,
                              "tail": null,
                              "length": 0
                            },
                            "length": 0,
                            "pipes": null,
                            "pipesCount": 0,
                            "flowing": true,
                            "ended": false,
                            "endEmitted": false,
                            "reading": true,
                            "sync": false,
                            "needReadable": true,
                            "emittedReadable": false,
                            "readableListening": false,
                            "resumeScheduled": false,
                            "emitClose": false,
                            "autoDestroy": false,
                            "destroyed": false,
                            "defaultEncoding": "utf8",
                            "awaitDrain": 0,
                            "readingMore": false,
                            "decoder": null,
                            "encoding": null
                          },
                          "readable": true,
                          "_events": {
                            "close": []
                          },
                          "_eventsCount": 6,
                          "_writableState": {
                            "objectMode": false,
                            "highWaterMark": 16384,
                            "finalCalled": true,
                            "needDrain": false,
                            "ending": true,
                            "ended": true,
                            "finished": false,
                            "destroyed": false,
                            "decodeStrings": false,
                            "defaultEncoding": "utf8",
                            "length": 0,
                            "writing": false,
                            "corked": 0,
                            "sync": false,
                            "bufferProcessing": false,
                            "writecb": null,
                            "writelen": 0,
                            "afterWriteTickInfo": null,
                            "bufferedRequest": null,
                            "lastBufferedRequest": null,
                            "pendingcb": 1,
                            "prefinished": false,
                            "errorEmitted": false,
                            "emitClose": false,
                            "autoDestroy": false,
                            "bufferedRequestCount": 0,
                            "corkedRequestsFree": {
                              "next": null,
                              "entry": null
                            }
                          },
                          "writable": false,
                          "allowHalfOpen": false,
                          "_sockname": null,
                          "_pendingData": null,
                          "_pendingEncoding": "",
                          "server": null,
                          "_server": null,
                          "parser": null,
                          "_httpMessage": "[Circular]"
                        }
                      ]
                    },
                    "freeSockets": {},
                    "keepAliveMsecs": 1000,
                    "keepAlive": false,
                    "maxSockets": null,
                    "maxFreeSockets": 256
                  }
                },
                "https:": {
                  "globalAgent": {
                    "_events": {},
                    "_eventsCount": 2,
                    "defaultPort": 443,
                    "protocol": "https:",
                    "options": {
                      "path": null
                    },
                    "requests": {},
                    "sockets": {},
                    "freeSockets": {},
                    "keepAliveMsecs": 1000,
                    "keepAlive": false,
                    "maxSockets": null,
                    "maxFreeSockets": 256,
                    "maxCachedSessions": 100,
                    "_sessionCache": {
                      "map": {},
                      "list": []
                    }
                  }
                }
              },
              "pathname": "/participants/dfspa"
            },
            "_ended": true,
            "_ending": true,
            "_redirectCount": 0,
            "_redirects": [],
            "_requestBodyLength": 0,
            "_requestBodyBuffers": [],
            "_currentRequest": "[Circular]",
            "_currentUrl": "http://central-ledger:3001/participants/dfspa"
          }
        },
        "response": {
          "status": 400,
          "statusText": "Bad Request",
          "headers": {
            "content-type": "application/json; charset=utf-8",
            "cache-control": "no-cache",
            "content-length": "128",
            "date": "Tue, 09 Feb 2021 04:58:36 GMT",
            "connection": "close"
          },
          "config": {
            "url": "http://central-ledger:3001/participants/dfspa",
            "method": "get",
            "data": null,
            "headers": {
              "FSPIOP-Destination": "switch",
              "Content-Type": "application/vnd.interoperability.participants+json;version=1.0",
              "date": "Tue, 09 Feb 2021 04:58:36 GMT",
              "FSPIOP-Source": "switch",
              "traceparent": "00-87082f7a42d576905659a6e7868ade0e-ac995039c148b4fc-00",
              "tracestate": "acmevendor=eyJzcGFuSWQiOiJhYzk5NTAzOWMxNDhiNGZjIn0=",
              "Accept": "application/vnd.interoperability.participants+json;version=1",
              "User-Agent": "axios/0.21.1"
            },
            "transformRequest": [],
            "transformResponse": [],
            "timeout": 0,
            "responseType": "json",
            "xsrfCookieName": "XSRF-TOKEN",
            "xsrfHeaderName": "X-XSRF-TOKEN",
            "maxContentLength": -1,
            "maxBodyLength": -1
          },
          "request": {
            "_events": {},
            "_eventsCount": 7,
            "outputData": [],
            "outputSize": 0,
            "writable": true,
            "_last": true,
            "chunkedEncoding": false,
            "shouldKeepAlive": false,
            "useChunkedEncodingByDefault": false,
            "sendDate": false,
            "_removedConnection": false,
            "_removedContLen": false,
            "_removedTE": false,
            "_contentLength": 0,
            "_hasBody": true,
            "_trailer": "",
            "finished": true,
            "_headerSent": true,
            "socket": {
              "connecting": false,
              "_hadError": false,
              "_parent": null,
              "_host": "central-ledger",
              "_readableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "buffer": {
                  "head": null,
                  "tail": null,
                  "length": 0
                },
                "length": 0,
                "pipes": null,
                "pipesCount": 0,
                "flowing": true,
                "ended": false,
                "endEmitted": false,
                "reading": true,
                "sync": false,
                "needReadable": true,
                "emittedReadable": false,
                "readableListening": false,
                "resumeScheduled": false,
                "emitClose": false,
                "autoDestroy": false,
                "destroyed": false,
                "defaultEncoding": "utf8",
                "awaitDrain": 0,
                "readingMore": false,
                "decoder": null,
                "encoding": null
              },
              "readable": true,
              "_events": {
                "close": []
              },
              "_eventsCount": 6,
              "_writableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "finalCalled": true,
                "needDrain": false,
                "ending": true,
                "ended": true,
                "finished": false,
                "destroyed": false,
                "decodeStrings": false,
                "defaultEncoding": "utf8",
                "length": 0,
                "writing": false,
                "corked": 0,
                "sync": false,
                "bufferProcessing": false,
                "writecb": null,
                "writelen": 0,
                "afterWriteTickInfo": null,
                "bufferedRequest": null,
                "lastBufferedRequest": null,
                "pendingcb": 1,
                "prefinished": false,
                "errorEmitted": false,
                "emitClose": false,
                "autoDestroy": false,
                "bufferedRequestCount": 0,
                "corkedRequestsFree": {
                  "next": null,
                  "entry": null
                }
              },
              "writable": false,
              "allowHalfOpen": false,
              "_sockname": null,
              "_pendingData": null,
              "_pendingEncoding": "",
              "server": null,
              "_server": null,
              "parser": null,
              "_httpMessage": "[Circular]"
            },
            "connection": {
              "connecting": false,
              "_hadError": false,
              "_parent": null,
              "_host": "central-ledger",
              "_readableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "buffer": {
                  "head": null,
                  "tail": null,
                  "length": 0
                },
                "length": 0,
                "pipes": null,
                "pipesCount": 0,
                "flowing": true,
                "ended": false,
                "endEmitted": false,
                "reading": true,
                "sync": false,
                "needReadable": true,
                "emittedReadable": false,
                "readableListening": false,
                "resumeScheduled": false,
                "emitClose": false,
                "autoDestroy": false,
                "destroyed": false,
                "defaultEncoding": "utf8",
                "awaitDrain": 0,
                "readingMore": false,
                "decoder": null,
                "encoding": null
              },
              "readable": true,
              "_events": {
                "close": []
              },
              "_eventsCount": 6,
              "_writableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "finalCalled": true,
                "needDrain": false,
                "ending": true,
                "ended": true,
                "finished": false,
                "destroyed": false,
                "decodeStrings": false,
                "defaultEncoding": "utf8",
                "length": 0,
                "writing": false,
                "corked": 0,
                "sync": false,
                "bufferProcessing": false,
                "writecb": null,
                "writelen": 0,
                "afterWriteTickInfo": null,
                "bufferedRequest": null,
                "lastBufferedRequest": null,
                "pendingcb": 1,
                "prefinished": false,
                "errorEmitted": false,
                "emitClose": false,
                "autoDestroy": false,
                "bufferedRequestCount": 0,
                "corkedRequestsFree": {
                  "next": null,
                  "entry": null
                }
              },
              "writable": false,
              "allowHalfOpen": false,
              "_sockname": null,
              "_pendingData": null,
              "_pendingEncoding": "",
              "server": null,
              "_server": null,
              "parser": null,
              "_httpMessage": "[Circular]"
            },
            "_header": "GET /participants/dfspa HTTP/1.1\r\nFSPIOP-Destination: switch\r\nContent-Type: application/vnd.interoperability.participants+json;version=1.0\r\ndate: Tue, 09 Feb 2021 04:58:36 GMT\r\nFSPIOP-Source: switch\r\ntraceparent: 00-87082f7a42d576905659a6e7868ade0e-ac995039c148b4fc-00\r\ntracestate: acmevendor=eyJzcGFuSWQiOiJhYzk5NTAzOWMxNDhiNGZjIn0=\r\nAccept: application/vnd.interoperability.participants+json;version=1\r\nUser-Agent: axios/0.21.1\r\nHost: central-ledger:3001\r\nConnection: close\r\n\r\n",
            "agent": {
              "_events": {},
              "_eventsCount": 2,
              "defaultPort": 80,
              "protocol": "http:",
              "options": {
                "path": null
              },
              "requests": {},
              "sockets": {
                "central-ledger:3001:": [
                  {
                    "connecting": false,
                    "_hadError": false,
                    "_parent": null,
                    "_host": "central-ledger",
                    "_readableState": {
                      "objectMode": false,
                      "highWaterMark": 16384,
                      "buffer": {
                        "head": null,
                        "tail": null,
                        "length": 0
                      },
                      "length": 0,
                      "pipes": null,
                      "pipesCount": 0,
                      "flowing": true,
                      "ended": false,
                      "endEmitted": false,
                      "reading": true,
                      "sync": false,
                      "needReadable": true,
                      "emittedReadable": false,
                      "readableListening": false,
                      "resumeScheduled": false,
                      "emitClose": false,
                      "autoDestroy": false,
                      "destroyed": false,
                      "defaultEncoding": "utf8",
                      "awaitDrain": 0,
                      "readingMore": false,
                      "decoder": null,
                      "encoding": null
                    },
                    "readable": true,
                    "_events": {
                      "close": []
                    },
                    "_eventsCount": 6,
                    "_writableState": {
                      "objectMode": false,
                      "highWaterMark": 16384,
                      "finalCalled": true,
                      "needDrain": false,
                      "ending": true,
                      "ended": true,
                      "finished": false,
                      "destroyed": false,
                      "decodeStrings": false,
                      "defaultEncoding": "utf8",
                      "length": 0,
                      "writing": false,
                      "corked": 0,
                      "sync": false,
                      "bufferProcessing": false,
                      "writecb": null,
                      "writelen": 0,
                      "afterWriteTickInfo": null,
                      "bufferedRequest": null,
                      "lastBufferedRequest": null,
                      "pendingcb": 1,
                      "prefinished": false,
                      "errorEmitted": false,
                      "emitClose": false,
                      "autoDestroy": false,
                      "bufferedRequestCount": 0,
                      "corkedRequestsFree": {
                        "next": null,
                        "entry": null
                      }
                    },
                    "writable": false,
                    "allowHalfOpen": false,
                    "_sockname": null,
                    "_pendingData": null,
                    "_pendingEncoding": "",
                    "server": null,
                    "_server": null,
                    "parser": null,
                    "_httpMessage": "[Circular]"
                  }
                ]
              },
              "freeSockets": {},
              "keepAliveMsecs": 1000,
              "keepAlive": false,
              "maxSockets": null,
              "maxFreeSockets": 256
            },
            "method": "GET",
            "path": "/participants/dfspa",
            "_ended": true,
            "res": {
              "_readableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "buffer": {
                  "head": null,
                  "tail": null,
                  "length": 0
                },
                "length": 0,
                "pipes": null,
                "pipesCount": 0,
                "flowing": true,
                "ended": true,
                "endEmitted": true,
                "reading": false,
                "sync": true,
                "needReadable": false,
                "emittedReadable": false,
                "readableListening": false,
                "resumeScheduled": false,
                "emitClose": true,
                "autoDestroy": false,
                "destroyed": false,
                "defaultEncoding": "utf8",
                "awaitDrain": 0,
                "readingMore": true,
                "decoder": null,
                "encoding": null
              },
              "readable": false,
              "_events": {
                "end": []
              },
              "_eventsCount": 3,
              "socket": {
                "connecting": false,
                "_hadError": false,
                "_parent": null,
                "_host": "central-ledger",
                "_readableState": {
                  "objectMode": false,
                  "highWaterMark": 16384,
                  "buffer": {
                    "head": null,
                    "tail": null,
                    "length": 0
                  },
                  "length": 0,
                  "pipes": null,
                  "pipesCount": 0,
                  "flowing": true,
                  "ended": false,
                  "endEmitted": false,
                  "reading": true,
                  "sync": false,
                  "needReadable": true,
                  "emittedReadable": false,
                  "readableListening": false,
                  "resumeScheduled": false,
                  "emitClose": false,
                  "autoDestroy": false,
                  "destroyed": false,
                  "defaultEncoding": "utf8",
                  "awaitDrain": 0,
                  "readingMore": false,
                  "decoder": null,
                  "encoding": null
                },
                "readable": true,
                "_events": {
                  "close": []
                },
                "_eventsCount": 6,
                "_writableState": {
                  "objectMode": false,
                  "highWaterMark": 16384,
                  "finalCalled": true,
                  "needDrain": false,
                  "ending": true,
                  "ended": true,
                  "finished": false,
                  "destroyed": false,
                  "decodeStrings": false,
                  "defaultEncoding": "utf8",
                  "length": 0,
                  "writing": false,
                  "corked": 0,
                  "sync": false,
                  "bufferProcessing": false,
                  "writecb": null,
                  "writelen": 0,
                  "afterWriteTickInfo": null,
                  "bufferedRequest": null,
                  "lastBufferedRequest": null,
                  "pendingcb": 1,
                  "prefinished": false,
                  "errorEmitted": false,
                  "emitClose": false,
                  "autoDestroy": false,
                  "bufferedRequestCount": 0,
                  "corkedRequestsFree": {
                    "next": null,
                    "entry": null
                  }
                },
                "writable": false,
                "allowHalfOpen": false,
                "_sockname": null,
                "_pendingData": null,
                "_pendingEncoding": "",
                "server": null,
                "_server": null,
                "parser": null,
                "_httpMessage": "[Circular]"
              },
              "connection": {
                "connecting": false,
                "_hadError": false,
                "_parent": null,
                "_host": "central-ledger",
                "_readableState": {
                  "objectMode": false,
                  "highWaterMark": 16384,
                  "buffer": {
                    "head": null,
                    "tail": null,
                    "length": 0
                  },
                  "length": 0,
                  "pipes": null,
                  "pipesCount": 0,
                  "flowing": true,
                  "ended": false,
                  "endEmitted": false,
                  "reading": true,
                  "sync": false,
                  "needReadable": true,
                  "emittedReadable": false,
                  "readableListening": false,
                  "resumeScheduled": false,
                  "emitClose": false,
                  "autoDestroy": false,
                  "destroyed": false,
                  "defaultEncoding": "utf8",
                  "awaitDrain": 0,
                  "readingMore": false,
                  "decoder": null,
                  "encoding": null
                },
                "readable": true,
                "_events": {
                  "close": []
                },
                "_eventsCount": 6,
                "_writableState": {
                  "objectMode": false,
                  "highWaterMark": 16384,
                  "finalCalled": true,
                  "needDrain": false,
                  "ending": true,
                  "ended": true,
                  "finished": false,
                  "destroyed": false,
                  "decodeStrings": false,
                  "defaultEncoding": "utf8",
                  "length": 0,
                  "writing": false,
                  "corked": 0,
                  "sync": false,
                  "bufferProcessing": false,
                  "writecb": null,
                  "writelen": 0,
                  "afterWriteTickInfo": null,
                  "bufferedRequest": null,
                  "lastBufferedRequest": null,
                  "pendingcb": 1,
                  "prefinished": false,
                  "errorEmitted": false,
                  "emitClose": false,
                  "autoDestroy": false,
                  "bufferedRequestCount": 0,
                  "corkedRequestsFree": {
                    "next": null,
                    "entry": null
                  }
                },
                "writable": false,
                "allowHalfOpen": false,
                "_sockname": null,
                "_pendingData": null,
                "_pendingEncoding": "",
                "server": null,
                "_server": null,
                "parser": null,
                "_httpMessage": "[Circular]"
              },
              "httpVersionMajor": 1,
              "httpVersionMinor": 1,
              "httpVersion": "1.1",
              "complete": true,
              "headers": {
                "content-type": "application/json; charset=utf-8",
                "cache-control": "no-cache",
                "content-length": "128",
                "date": "Tue, 09 Feb 2021 04:58:36 GMT",
                "connection": "close"
              },
              "rawHeaders": [
                "content-type",
                "application/json; charset=utf-8",
                "cache-control",
                "no-cache",
                "content-length",
                "128",
                "Date",
                "Tue, 09 Feb 2021 04:58:36 GMT",
                "Connection",
                "close"
              ],
              "trailers": {},
              "rawTrailers": [],
              "aborted": false,
              "upgrade": false,
              "url": "",
              "method": null,
              "statusCode": 400,
              "statusMessage": "Bad Request",
              "client": {
                "connecting": false,
                "_hadError": false,
                "_parent": null,
                "_host": "central-ledger",
                "_readableState": {
                  "objectMode": false,
                  "highWaterMark": 16384,
                  "buffer": {
                    "head": null,
                    "tail": null,
                    "length": 0
                  },
                  "length": 0,
                  "pipes": null,
                  "pipesCount": 0,
                  "flowing": true,
                  "ended": false,
                  "endEmitted": false,
                  "reading": true,
                  "sync": false,
                  "needReadable": true,
                  "emittedReadable": false,
                  "readableListening": false,
                  "resumeScheduled": false,
                  "emitClose": false,
                  "autoDestroy": false,
                  "destroyed": false,
                  "defaultEncoding": "utf8",
                  "awaitDrain": 0,
                  "readingMore": false,
                  "decoder": null,
                  "encoding": null
                },
                "readable": true,
                "_events": {
                  "close": []
                },
                "_eventsCount": 6,
                "_writableState": {
                  "objectMode": false,
                  "highWaterMark": 16384,
                  "finalCalled": true,
                  "needDrain": false,
                  "ending": true,
                  "ended": true,
                  "finished": false,
                  "destroyed": false,
                  "decodeStrings": false,
                  "defaultEncoding": "utf8",
                  "length": 0,
                  "writing": false,
                  "corked": 0,
                  "sync": false,
                  "bufferProcessing": false,
                  "writecb": null,
                  "writelen": 0,
                  "afterWriteTickInfo": null,
                  "bufferedRequest": null,
                  "lastBufferedRequest": null,
                  "pendingcb": 1,
                  "prefinished": false,
                  "errorEmitted": false,
                  "emitClose": false,
                  "autoDestroy": false,
                  "bufferedRequestCount": 0,
                  "corkedRequestsFree": {
                    "next": null,
                    "entry": null
                  }
                },
                "writable": false,
                "allowHalfOpen": false,
                "_sockname": null,
                "_pendingData": null,
                "_pendingEncoding": "",
                "server": null,
                "_server": null,
                "parser": null,
                "_httpMessage": "[Circular]"
              },
              "_consuming": false,
              "_dumped": false,
              "req": "[Circular]",
              "responseUrl": "http://central-ledger:3001/participants/dfspa",
              "redirects": []
            },
            "aborted": false,
            "timeoutCb": null,
            "upgradeOrConnect": false,
            "parser": null,
            "maxHeadersCount": null,
            "reusedSocket": false,
            "_redirectable": {
              "_writableState": {
                "objectMode": false,
                "highWaterMark": 16384,
                "finalCalled": false,
                "needDrain": false,
                "ending": false,
                "ended": false,
                "finished": false,
                "destroyed": false,
                "decodeStrings": true,
                "defaultEncoding": "utf8",
                "length": 0,
                "writing": false,
                "corked": 0,
                "sync": true,
                "bufferProcessing": false,
                "writecb": null,
                "writelen": 0,
                "afterWriteTickInfo": null,
                "bufferedRequest": null,
                "lastBufferedRequest": null,
                "pendingcb": 0,
                "prefinished": false,
                "errorEmitted": false,
                "emitClose": true,
                "autoDestroy": false,
                "bufferedRequestCount": 0,
                "corkedRequestsFree": {
                  "next": null,
                  "entry": null
                }
              },
              "writable": true,
              "_events": {},
              "_eventsCount": 2,
              "_options": {
                "maxRedirects": 21,
                "maxBodyLength": 10485760,
                "protocol": "http:",
                "path": "/participants/dfspa",
                "method": "GET",
                "headers": {
                  "FSPIOP-Destination": "switch",
                  "Content-Type": "application/vnd.interoperability.participants+json;version=1.0",
                  "date": "Tue, 09 Feb 2021 04:58:36 GMT",
                  "FSPIOP-Source": "switch",
                  "traceparent": "00-87082f7a42d576905659a6e7868ade0e-ac995039c148b4fc-00",
                  "tracestate": "acmevendor=eyJzcGFuSWQiOiJhYzk5NTAzOWMxNDhiNGZjIn0=",
                  "Accept": "application/vnd.interoperability.participants+json;version=1",
                  "User-Agent": "axios/0.21.1"
                },
                "agents": {},
                "hostname": "central-ledger",
                "port": "3001",
                "nativeProtocols": {
                  "http:": {
                    "METHODS": [
                      "ACL",
                      "BIND",
                      "CHECKOUT",
                      "CONNECT",
                      "COPY",
                      "DELETE",
                      "GET",
                      "HEAD",
                      "LINK",
                      "LOCK",
                      "M-SEARCH",
                      "MERGE",
                      "MKACTIVITY",
                      "MKCALENDAR",
                      "MKCOL",
                      "MOVE",
                      "NOTIFY",
                      "OPTIONS",
                      "PATCH",
                      "POST",
                      "PROPFIND",
                      "PROPPATCH",
                      "PURGE",
                      "PUT",
                      "REBIND",
                      "REPORT",
                      "SEARCH",
                      "SOURCE",
                      "SUBSCRIBE",
                      "TRACE",
                      "UNBIND",
                      "UNLINK",
                      "UNLOCK",
                      "UNSUBSCRIBE"
                    ],
                    "STATUS_CODES": {
                      "100": "Continue",
                      "101": "Switching Protocols",
                      "102": "Processing",
                      "103": "Early Hints",
                      "200": "OK",
                      "201": "Created",
                      "202": "Accepted",
                      "203": "Non-Authoritative Information",
                      "204": "No Content",
                      "205": "Reset Content",
                      "206": "Partial Content",
                      "207": "Multi-Status",
                      "208": "Already Reported",
                      "226": "IM Used",
                      "300": "Multiple Choices",
                      "301": "Moved Permanently",
                      "302": "Found",
                      "303": "See Other",
                      "304": "Not Modified",
                      "305": "Use Proxy",
                      "307": "Temporary Redirect",
                      "308": "Permanent Redirect",
                      "400": "Bad Request",
                      "401": "Unauthorized",
                      "402": "Payment Required",
                      "403": "Forbidden",
                      "404": "Not Found",
                      "405": "Method Not Allowed",
                      "406": "Not Acceptable",
                      "407": "Proxy Authentication Required",
                      "408": "Request Timeout",
                      "409": "Conflict",
                      "410": "Gone",
                      "411": "Length Required",
                      "412": "Precondition Failed",
                      "413": "Payload Too Large",
                      "414": "URI Too Long",
                      "415": "Unsupported Media Type",
                      "416": "Range Not Satisfiable",
                      "417": "Expectation Failed",
                      "418": "I'm a Teapot",
                      "421": "Misdirected Request",
                      "422": "Unprocessable Entity",
                      "423": "Locked",
                      "424": "Failed Dependency",
                      "425": "Unordered Collection",
                      "426": "Upgrade Required",
                      "428": "Precondition Required",
                      "429": "Too Many Requests",
                      "431": "Request Header Fields Too Large",
                      "451": "Unavailable For Legal Reasons",
                      "500": "Internal Server Error",
                      "501": "Not Implemented",
                      "502": "Bad Gateway",
                      "503": "Service Unavailable",
                      "504": "Gateway Timeout",
                      "505": "HTTP Version Not Supported",
                      "506": "Variant Also Negotiates",
                      "507": "Insufficient Storage",
                      "508": "Loop Detected",
                      "509": "Bandwidth Limit Exceeded",
                      "510": "Not Extended",
                      "511": "Network Authentication Required"
                    },
                    "maxHeaderSize": 8192,
                    "globalAgent": {
                      "_events": {},
                      "_eventsCount": 2,
                      "defaultPort": 80,
                      "protocol": "http:",
                      "options": {
                        "path": null
                      },
                      "requests": {},
                      "sockets": {
                        "central-ledger:3001:": [
                          {
                            "connecting": false,
                            "_hadError": false,
                            "_parent": null,
                            "_host": "central-ledger",
                            "_readableState": {
                              "objectMode": false,
                              "highWaterMark": 16384,
                              "buffer": {
                                "head": null,
                                "tail": null,
                                "length": 0
                              },
                              "length": 0,
                              "pipes": null,
                              "pipesCount": 0,
                              "flowing": true,
                              "ended": false,
                              "endEmitted": false,
                              "reading": true,
                              "sync": false,
                              "needReadable": true,
                              "emittedReadable": false,
                              "readableListening": false,
                              "resumeScheduled": false,
                              "emitClose": false,
                              "autoDestroy": false,
                              "destroyed": false,
                              "defaultEncoding": "utf8",
                              "awaitDrain": 0,
                              "readingMore": false,
                              "decoder": null,
                              "encoding": null
                            },
                            "readable": true,
                            "_events": {
                              "close": []
                            },
                            "_eventsCount": 6,
                            "_writableState": {
                              "objectMode": false,
                              "highWaterMark": 16384,
                              "finalCalled": true,
                              "needDrain": false,
                              "ending": true,
                              "ended": true,
                              "finished": false,
                              "destroyed": false,
                              "decodeStrings": false,
                              "defaultEncoding": "utf8",
                              "length": 0,
                              "writing": false,
                              "corked": 0,
                              "sync": false,
                              "bufferProcessing": false,
                              "writecb": null,
                              "writelen": 0,
                              "afterWriteTickInfo": null,
                              "bufferedRequest": null,
                              "lastBufferedRequest": null,
                              "pendingcb": 1,
                              "prefinished": false,
                              "errorEmitted": false,
                              "emitClose": false,
                              "autoDestroy": false,
                              "bufferedRequestCount": 0,
                              "corkedRequestsFree": {
                                "next": null,
                                "entry": null
                              }
                            },
                            "writable": false,
                            "allowHalfOpen": false,
                            "_sockname": null,
                            "_pendingData": null,
                            "_pendingEncoding": "",
                            "server": null,
                            "_server": null,
                            "parser": null,
                            "_httpMessage": "[Circular]"
                          }
                        ]
                      },
                      "freeSockets": {},
                      "keepAliveMsecs": 1000,
                      "keepAlive": false,
                      "maxSockets": null,
                      "maxFreeSockets": 256
                    }
                  },
                  "https:": {
                    "globalAgent": {
                      "_events": {},
                      "_eventsCount": 2,
                      "defaultPort": 443,
                      "protocol": "https:",
                      "options": {
                        "path": null
                      },
                      "requests": {},
                      "sockets": {},
                      "freeSockets": {},
                      "keepAliveMsecs": 1000,
                      "keepAlive": false,
                      "maxSockets": null,
                      "maxFreeSockets": 256,
                      "maxCachedSessions": 100,
                      "_sessionCache": {
                        "map": {},
                        "list": []
                      }
                    }
                  }
                },
                "pathname": "/participants/dfspa"
              },
              "_ended": true,
              "_ending": true,
              "_redirectCount": 0,
              "_redirects": [],
              "_requestBodyLength": 0,
              "_requestBodyBuffers": [],
              "_currentRequest": "[Circular]",
              "_currentUrl": "http://central-ledger:3001/participants/dfspa"
            }
          },
          "data": {
            "errorInformation": {
              "errorCode": "3200",
              "errorDescription": "Generic ID not found - The requested resource could not be found."
            }
          }
        },
        "isAxiosError": true,
        "level": "\u001b[31merror\u001b[39m",
        "timestamp": "2021-02-09T04:58:36.986Z",
        "name": "Error",
        "message": "Request failed with status code 400",
        "stack": "Error: Request failed with status code 400\n    at createError (/opt/account-lookup-service/node_modules/@mojaloop/central-services-shared/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/opt/account-lookup-service/node_modules/@mojaloop/central-services-shared/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/opt/account-lookup-service/node_modules/@mojaloop/central-services-shared/node_modules/axios/lib/adapters/http.js:260:11)\n    at IncomingMessage.emit (events.js:323:22)\n    at endReadableNT (_stream_readable.js:1204:12)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)"
      },
      "replyTo": "switch",
      "apiErrorCode": {
        "code": "1001",
        "message": "Destination communication error",
        "name": "DESTINATION_COMMUNICATION_ERROR",
        "type": {
          "regex": "^10[0-9]{2}$",
          "description": "Generic Communication Error",
          "httpStatusCode": 503,
          "name": "GENERIC_COMMUNICATION_ERROR"
        },
        "httpStatusCode": 503
      },
      "httpStatusCode": 503,
      "extensions": [
        {
          "key": "status",
          "value": 400
        },
        {
          "key": "cause",
          "value": "[{\"key\":\"url\",\"value\":\"http://central-ledger:3001/participants/dfspa\"},{\"key\":\"sourceFsp\",\"value\":\"switch\"},{\"key\":\"destinationFsp\",\"value\":\"switch\"},{\"key\":\"method\",\"value\":\"GET\"},{\"key\":\"request\",\"value\":\"{\\\"url\\\":\\\"http://central-ledger:3001/participants/dfspa\\\",\\\"method\\\":\\\"GET\\\",\\\"headers\\\":{\\\"accept\\\":\\\"application/vnd.interoperability.participants+json;version=1\\\",\\\"FSPIOP-Destination\\\":\\\"switch\\\",\\\"Content-Type\\\":\\\"application/vnd.interoperability.participants+json;version=1.0\\\",\\\"date\\\":\\\"Tue, 09 Feb 2021 04:58:36 GMT\\\",\\\"FSPIOP-Source\\\":\\\"switch\\\",\\\"traceparent\\\":\\\"00-87082f7a42d576905659a6e7868ade0e-ac995039c148b4fc-00\\\",\\\"tracestate\\\":\\\"acmevendor=eyJzcGFuSWQiOiJhYzk5NTAzOWMxNDhiNGZjIn0=\\\"},\\\"data\\\":null,\\\"responseType\\\":\\\"json\\\"}\"},{\"key\":\"errorMessage\",\"value\":\"Request failed with status code 400\"},{\"key\":\"status\",\"value\":400},{\"key\":\"response\",\"value\":{\"errorInformation\":{\"errorCode\":\"3200\",\"errorDescription\":\"Generic ID not found - The requested resource could not be found.\"}}}]"
        }
      ],
      "useMessageAsDescription": false,
      "message": "Failed to send HTTP request to host",
      "stack": "FSPIOPError: Failed to send HTTP request to host\n    at Object.createFSPIOPError (/opt/account-lookup-service/node_modules/@mojaloop/central-services-shared/node_modules/@mojaloop/central-services-error-handling/src/factory.js:198:12)\n    at Object.sendRequest (/opt/account-lookup-service/node_modules/@mojaloop/central-services-shared/src/util/request.js:120:46)\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)\nError: Request failed with status code 400\n    at createError (/opt/account-lookup-service/node_modules/@mojaloop/central-services-shared/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/opt/account-lookup-service/node_modules/@mojaloop/central-services-shared/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/opt/account-lookup-service/node_modules/@mojaloop/central-services-shared/node_modules/axios/lib/adapters/http.js:260:11)\n    at IncomingMessage.emit (events.js:323:22)\n    at endReadableNT (_stream_readable.js:1204:12)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)"
    }
  },
  "metadata": {
    "event": {
      "id": "3b3d7256-523f-4be6-9c95-7fc81e72bb31",
      "type": "log",
      "action": "error",
      "createdAt": "2021-02-09T04:58:36.988Z",
      "state": {
        "status": "failed",
        "code": "1001",
        "description": "Destination communication error"
      }
    },
    "trace": {
      "startTimestamp": "2021-02-09T04:58:36.981Z",
      "service": "getParticipantsByTypeAndID_sendRequest",
      "traceId": "87082f7a42d576905659a6e7868ade0e",
      "spanId": "07bcd6c57d7b478d",
      "parentSpanId": "ac995039c148b4fc",
      "tags": {
        "tracestate": "acmevendor=eyJzcGFuSWQiOiIwN2JjZDZjNTdkN2I0NzhkIn0=",
        "transactionType": "participant",
        "transactionAction": "lookup",
        "source": "switch",
        "destination": "switch",
        "method": "GET",
        "url": "http://central-ledger:3001/participants/dfspa"
      },
      "tracestates": {
        "acmevendor": {
          "spanId": "07bcd6c57d7b478d"
        }
      }
    }
  }
}
2021-02-09T04:58:36.992Z - error: Failed to send HTTP request to host
2021-02-09T04:58:36.992Z - error: Failed to send HTTP request to host

  1. observe the long log printing out the entire error object - taking up many many lines

Specifications

  • Component (if known): account-lookup-service
  • Version: v11.1.2
  • Bug found/raised by: @lewisdaly

Notes:

  • Severity when opened:
  • Priority when opened:
@lewisdaly lewisdaly added the bug label Feb 9, 2021
@elnyry-sam-k elnyry-sam-k added the oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it label Feb 9, 2021
@elnyry-sam-k elnyry-sam-k added the bug Something isn't working or it has wrong behavior on a Mojaloop Core service label Feb 15, 2021
@elnyry-sam-k elnyry-sam-k added the triaged This bug has been triaged by the triage team! label Mar 29, 2021
@elnyry-sam-k elnyry-sam-k added this to the Sprint 14.3 milestone May 31, 2021
@mdebarros mdebarros self-assigned this May 31, 2021
@mdebarros
Copy link
Member

Hey @lewisdaly,

I can't seem to reproduce this.

I have tried the following:

  1. Connectivity issues to Oracle
2021-05-31T10:20:37.613Z - error: {
  "type": "application/json",
  "id": "a73243d4-1e37-44da-870e-62891e704346",
  "content": {
    "error": {
      "name": "FSPIOPError",
      "cause": {
        "message": "connect ECONNREFUSED 127.0.0.1:8444",
        "name": "Error",
        "stack": "Error: connect ECONNREFUSED 127.0.0.1:8444\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)",
        "config": {
          "url": "http://localhost:8444/oracle/participants/MSISDN/27713803912",
          "method": "get",
          "headers": {
            "fspiop-source": "payerfsp",
            "date": "Thu, 24 Jan 2019 10:22:12 GMT",
            "authorization": "Bearer {{SIMPAYER_BEARER_TOKEN}}",
            "user-agent": "PostmanRuntime/7.28.0",
            "cache-control": "no-cache",
            "postman-token": "0e29af5f-2a73-4a8e-9888-8964c253a0fd",
            "accept-encoding": "gzip, deflate, br",
            "connection": "keep-alive",
            "traceid": "e8ec1a64-7825-40ea-aeb0-323e2dc99409",
            "fspiop-destination": "switch",
            "Accept": "application/vnd.interoperability.parties+json;version=1",
            "Content-Type": "application/vnd.interoperability.parties+json;version=1.0"
          },
          "transformRequest": [
            null
          ],
          "transformResponse": [
            null
          ],
          "timeout": 0,
          "responseType": "json",
          "xsrfCookieName": "XSRF-TOKEN",
          "xsrfHeaderName": "X-XSRF-TOKEN",
          "maxContentLength": -1,
          "maxBodyLength": -1
        },
        "code": "ECONNREFUSED"
      },
      "replyTo": "payerfsp",
      "apiErrorCode": {
        "code": "1001",
        "message": "Destination communication error",
        "name": "DESTINATION_COMMUNICATION_ERROR",
        "type": {
          "regex": "^10[0-9]{2}$",
          "description": "Generic Communication Error",
          "httpStatusCode": 503,
          "name": "GENERIC_COMMUNICATION_ERROR"
        },
        "httpStatusCode": 503
      },
      "httpStatusCode": 503,
      "extensions": [
        {
          "key": "cause",
          "value": "[{\"key\":\"url\",\"value\":\"http://localhost:8444/oracle/participants/MSISDN/27713803912\"},{\"key\":\"sourceFsp\",\"value\":\"payerfsp\"},{\"key\":\"destinationFsp\",\"value\":\"switch\"},{\"key\":\"method\",\"value\":\"GET\"},{\"key\":\"request\",\"value\":\"{\\\"url\\\":\\\"http://localhost:8444/oracle/participants/MSISDN/27713803912\\\",\\\"method\\\":\\\"GET\\\",\\\"headers\\\":{\\\"accept\\\":\\\"application/vnd.interoperability.parties+json;version=1\\\",\\\"content-type\\\":\\\"application/vnd.interoperability.parties+json;version=1.0\\\",\\\"fspiop-source\\\":\\\"payerfsp\\\",\\\"date\\\":\\\"Thu, 24 Jan 2019 10:22:12 GMT\\\",\\\"authorization\\\":\\\"Bearer {{SIMPAYER_BEARER_TOKEN}}\\\",\\\"user-agent\\\":\\\"PostmanRuntime/7.28.0\\\",\\\"cache-control\\\":\\\"no-cache\\\",\\\"postman-token\\\":\\\"0e29af5f-2a73-4a8e-9888-8964c253a0fd\\\",\\\"accept-encoding\\\":\\\"gzip, deflate, br\\\",\\\"connection\\\":\\\"keep-alive\\\",\\\"traceid\\\":\\\"e8ec1a64-7825-40ea-aeb0-323e2dc99409\\\",\\\"fspiop-destination\\\":\\\"switch\\\"},\\\"responseType\\\":\\\"json\\\"}\"},{\"key\":\"errorMessage\",\"value\":\"connect ECONNREFUSED 127.0.0.1:8444\"}]"
        }
      ],
      "useMessageAsDescription": false,
      "level": "\u001b[31merror\u001b[39m",
      "timestamp": "2021-05-31T10:20:37.577Z",
      "message": "Failed to send HTTP request to host",
      "stack": "FSPIOPError: Failed to send HTTP request to host\n    at Object.createFSPIOPError (/Users/mdebarros/Documents/work/projects/mojaloop/git/account-lookup-service/node_modules/@mojaloop/central-services-error-handling/src/factory.js:198:12)\n    at Object.sendRequest (/Users/mdebarros/Documents/work/projects/mojaloop/git/account-lookup-service/node_modules/@mojaloop/central-services-shared/src/util/request.js:120:46)\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)\nError: connect ECONNREFUSED 127.0.0.1:8444\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)"
    }
  },
  "metadata": {
    "event": {
      "id": "db087103-495e-443f-80a0-9f59f0ea38e8",
      "type": "log",
      "action": "error",
      "createdAt": "2021-05-31T10:20:37.613Z",
      "state": {
        "status": "failed",
        "code": "1001",
        "description": "Destination communication error"
      }
    },
    "trace": {
      "startTimestamp": "2021-05-31T10:20:37.465Z",
      "service": "getPartiesByTypeAndID",
      "traceId": "7d081c2f808b3a378d6a9032a0a11fdd",
      "spanId": "557531853c6c61ea",
      "parentSpanId": "58a8a1c1c60214c9",
      "tags": {
        "tracestate": "acmevendor=eyJzcGFuSWQiOiI1NTc1MzE4NTNjNmM2MWVhIn0=",
        "transactionType": "party",
        "transactionAction": "lookup",
        "source": "payerfsp"
      },
      "tracestates": {
        "acmevendor": {
          "spanId": "557531853c6c61ea"
        }
      }
    }
  }
}
  1. Tried against a non-registered partyIdType (i.e. no Oracle exists for that).
2021-05-31T10:18:50.873Z - error: {
  "type": "application/json",
  "id": "2bd3d14a-ecfd-4344-8e15-614d7f30a789",
  "content": {
    "error": {
      "name": "FSPIOPError",
      "apiErrorCode": {
        "code": "3003",
        "message": "Add Party information error",
        "name": "ADD_PARTY_INFO_ERROR",
        "type": {
          "regex": "^30[0-9]{2}$",
          "description": "Generic Client Error",
          "httpStatusCode": 400,
          "name": "GENERIC_CLIENT_ERROR"
        },
        "httpStatusCode": 400
      },
      "httpStatusCode": 400,
      "useMessageAsDescription": false,
      "level": "\u001b[31merror\u001b[39m",
      "timestamp": "2021-05-31T10:18:50.841Z",
      "message": "Oracle type: ALIAS not found",
      "stack": "FSPIOPError: Oracle type: ALIAS not found\n    at Object.createFSPIOPError (/Users/mdebarros/Documents/work/projects/mojaloop/git/account-lookup-service/node_modules/@mojaloop/central-services-error-handling/src/factory.js:198:12)\n    at _getOracleEndpointByType (/Users/mdebarros/Documents/work/projects/mojaloop/git/account-lookup-service/src/models/oracle/facade.js:159:32)\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)\n    at async Object.exports.oracleRequest (/Users/mdebarros/Documents/work/projects/mojaloop/git/account-lookup-service/src/models/oracle/facade.js:65:13)\n    at async Object.getPartiesByTypeAndID (/Users/mdebarros/Documents/work/projects/mojaloop/git/account-lookup-service/src/domain/parties/parties.js:70:24)"
    }
  },
  "metadata": {
    "event": {
      "id": "dadbd803-0f7f-49af-ae3f-383ad012889c",
      "type": "log",
      "action": "error",
      "createdAt": "2021-05-31T10:18:50.873Z",
      "state": {
        "status": "failed",
        "code": "3003",
        "description": "Add Party information error"
      }
    },
    "trace": {
      "startTimestamp": "2021-05-31T10:18:50.637Z",
      "service": "getPartiesByTypeAndID",
      "traceId": "91a77806e25fd75d635973a344ffcc11",
      "spanId": "552a995ca5b76e62",
      "parentSpanId": "abed7fc99fc0719b",
      "tags": {
        "tracestate": "acmevendor=eyJzcGFuSWQiOiI1NTJhOTk1Y2E1Yjc2ZTYyIn0=",
        "transactionType": "party",
        "transactionAction": "lookup",
        "source": "payerfsp"
      },
      "tracestates": {
        "acmevendor": {
          "spanId": "552a995ca5b76e62"
        }
      }
    }
  }
}

In both cases, I am unable to re-produce anything like your example above.

Let me know when you are available to discuss this in more detail.

@lewisdaly
Copy link
Contributor Author

Hmm looking at example #1 - my case has a request failed with status 400 error, and not a connection refused error... maybe it has to do with the way the type of error the request client encounters.

@mdebarros
Copy link
Member

mdebarros commented Jun 2, 2021

Reproduced the issue in https://github.com/mojaloop/account-lookup-service/releases/tag/v11.1.2 release.

The issue is no longer applicable to https://github.com/mojaloop/account-lookup-service/releases/tag/v11.5.0.

I believe the reason is due to the upgrading of the serialize-error dependency within the event-sdk: https://github.com/mojaloop/event-sdk/pull/55/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it triaged This bug has been triaged by the triage team!
Projects
None yet
Development

No branches or pull requests

4 participants