From 2be3e64cd8820f61b082cdae5cfdbba2e891921d Mon Sep 17 00:00:00 2001 From: Sanaz Taheri Boshrooyeh <35961250+staheri14@users.noreply.github.com> Date: Mon, 19 Jul 2021 08:04:59 -0700 Subject: [PATCH] Adds error field to history response (#433) * updates the History response * minor edit * Update content/docs/rfcs/13/README.md Co-authored-by: oskarth * Update content/docs/rfcs/13/README.md Co-authored-by: oskarth Co-authored-by: oskarth --- content/docs/rfcs/13/README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/content/docs/rfcs/13/README.md b/content/docs/rfcs/13/README.md index 4733952c..04c00a41 100644 --- a/content/docs/rfcs/13/README.md +++ b/content/docs/rfcs/13/README.md @@ -82,6 +82,11 @@ message HistoryResponse { // the first field is reserved for future use repeated WakuMessage messages = 2; PagingInfo pagingInfo = 3; + enum Error { + NONE = 0; + INVALID_CURSOR = 1; + } + Error error = 4; } message HistoryRPC { @@ -142,6 +147,9 @@ RPC call to respond to a HistoryQuery call. In the forward pagination, the `cursor` holds the `Index` of the last message in the `HistoryResponse` `messages` (and the first message in the backward paging). The requester shall embed the returned `cursor` inside its next `HistoryQuery` to retrieve the next page of the waku messages. The `cursor` obtained from one node SHOULD NOT be used in a request to another node because the result MAY be different. +- The `error` field contains information about any error that has occurred while processing the corresponding `HistoryQuery`. + `NONE` stands for no error. This is also the default value. + `INVALID_CURSOR` means that the `cursor` field of `HistoryQuery` does not match with the `Index` of any of the `WakuMessage`s persisted by the queried node. # Future Work @@ -179,5 +187,3 @@ This proves accuracy within a range of minutes (e.g., in Bitcoin blockchain) or Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). - -