Skip to content

Commit

Permalink
add contentNotFoundWithTrace error
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed Sep 26, 2024
1 parent 62a3536 commit 351031f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
6 changes: 5 additions & 1 deletion jsonrpc/src/errors/errors.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"ContentNotFoundError": {
"code": -32099,
"message": "content not found"
},
"ContentNotFoundErrorWithTrace": {
"code": -32098,
"message": "content not found",
"data": {
"$ref": "#/components/schemas/traceResultObject"
}
}
}
}
5 changes: 4 additions & 1 deletion jsonrpc/src/methods/beacon.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@
],
"result": {
"$ref": "#/components/contentDescriptors/TraceRecursiveFindContentResult"
}
},
"errors":[{
"$ref": "#/components/errors/ContentNotFoundErrorWithTrace"
}]
},
{
"name": "portal_beaconStore",
Expand Down
5 changes: 4 additions & 1 deletion jsonrpc/src/methods/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@
],
"result": {
"$ref": "#/components/contentDescriptors/TraceRecursiveFindContentResult"
}
},
"errors":[{
"$ref": "#/components/errors/ContentNotFoundErrorWithTrace"
}]
},
{
"name": "portal_historyStore",
Expand Down
15 changes: 15 additions & 0 deletions jsonrpc/src/methods/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,21 @@
"$ref": "#/components/contentDescriptors/RecursiveFindContentResult"
}
},
{
"name": "portal_stateTraceRecursiveFindContent",
"summary": "Look up a target content key in the network and get tracing data",
"params": [
{
"$ref": "#/components/contentDescriptors/ContentKey"
}
],
"result": {
"$ref": "#/components/contentDescriptors/TraceRecursiveFindContentResult"
},
"errors":[{
"$ref": "#/components/errors/ContentNotFoundErrorWithTrace"
}]
},
{
"name": "portal_stateStore",
"summary": "Store state content key with content data",
Expand Down

0 comments on commit 351031f

Please sign in to comment.