Improve errors (#893)

- `RippledError`: Include the full response from the `rippled` server.
- A new test ensures correct behavior when `streams` is not an array.
- `NotConnectedError` may be thrown with a different message than before.
This commit is contained in:
Elliot Lee
2018-05-12 09:38:49 -07:00
committed by GitHub
parent 226ef862ae
commit 54f12862dc
6 changed files with 47 additions and 12 deletions

View File

@@ -16,6 +16,7 @@ module.exports = {
},
empty: require('./empty'),
subscribe: require('./subscribe'),
subscribe_error: require('./subscribe_error'),
unsubscribe: require('./unsubscribe'),
account_objects: {
normal: require('./account-objects'),

View File

@@ -0,0 +1,13 @@
{
"id": 0,
"status": "error",
"type": "response",
"error": "invalidParams",
"error_code": 31,
"error_message": "Invalid parameters.",
"request": {
"command": "subscribe",
"id": 0,
"streams": "validations"
}
}