In #1792, we introduced GetNoteError endpoint, but I think we could generalize it to something like GetNetworkNoteStatus endpoint.
The endpoint would take a note ID as an input, and would return:
- "Not found" if the note doesn't exist or is not a network note.
- Status of the note - maybe:
pending - we are still trying to execute this note (whether there were errors or not).
processed - the note made it into a transaction which was sent to the block producer.
committed - the network is now in the store.
discarded - the note failed too many times and won't be retried in the future.
- The last error associated with the note execution - basically, what
GetNoteError returns now (this is applicable for all status above).
This will provide an easy way for users to figure out if an error was a transient error that was resolved, or if the note is now fully discarded.
In #1792, we introduced
GetNoteErrorendpoint, but I think we could generalize it to something likeGetNetworkNoteStatusendpoint.The endpoint would take a note ID as an input, and would return:
pending- we are still trying to execute this note (whether there were errors or not).processed- the note made it into a transaction which was sent to the block producer.committed- the network is now in the store.discarded- the note failed too many times and won't be retried in the future.GetNoteErrorreturns now (this is applicable for all status above).This will provide an easy way for users to figure out if an error was a transient error that was resolved, or if the note is now fully discarded.