mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
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:
1
test/fixtures/rippled/index.js
vendored
1
test/fixtures/rippled/index.js
vendored
@@ -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'),
|
||||
|
||||
13
test/fixtures/rippled/subscribe_error.json
vendored
Normal file
13
test/fixtures/rippled/subscribe_error.json
vendored
Normal 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user