interledger / connector.land

https://connector.land
3 stars 7 forks source link

Deal with non-json responses #23

Open michielbdejong opened 7 years ago

michielbdejong commented 7 years ago
2017-07-19T08:22:02.771729+00:00 app[web.1]: response in text Unknown method get_limit
2017-07-19T08:22:02.774504+00:00 app[web.1]: (node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token U in JSON at position 0
2017-07-19T08:22:02.774607+00:00 app[web.1]: (node:17) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

When the response to the get_limit test is non-JSON, it should be used as-is (truncated so it fits the column).