Skip to content

Commit 07e2ebf

Browse files
committed
error example
1 parent 076fac0 commit 07e2ebf

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

docs/sdk-and-tools/rest-api/ws-subscriptions.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ The error object contains context about which subscription failed and why.
376376

377377
| Field | Type | Description |
378378
|---------|--------|------------------------------------------------------------------------------------|
379-
| pattern | string | The subscription topic (event name) that was requested (e.g., `subscribeTransactions`). |
379+
| pattern | string | The subscription topic (event name) that was requested (e.g., `subscribePool`). |
380380
| data | object | The original payload sent by the client that caused the error. |
381381
| error | object | The specific error returned by the server. |
382382

@@ -400,11 +400,27 @@ socket.on("error", (errorData) => {
400400

401401
```json
402402
{
403-
"pattern": "subscribeCustomTransactions",
404-
"data": {
405-
"function": "newGame"
403+
"pattern": "subscribePool",
404+
"data": {
405+
"from": 0,
406+
"size": 25,
407+
"type": "badInput"
406408
},
407-
"error": "Maximum number of X global subscriptions accepted by server reached!"
409+
"error": [
410+
{
411+
"target": {
412+
"from": 0,
413+
"size": 25,
414+
"type": "badInput"
415+
},
416+
"value": "badInput",
417+
"property": "type",
418+
"children": [],
419+
"constraints": {
420+
"isEnum": "type must be one of the following values: Transaction, SmartContractResult, Reward"
421+
}
422+
}
423+
]
408424
}
409425
```
410426

0 commit comments

Comments
 (0)