Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling errors #41

Open
draggett opened this issue Jun 10, 2021 · 0 comments
Open

Handling errors #41

draggett opened this issue Jun 10, 2021 · 0 comments

Comments

@draggett
Copy link
Member

Chunk operations such as get and put update the module's buffer status. The status is one of pending, okay, nomatch, failed, or forbidden. An example is where @do get is used to request a matching chunk, and no such match is found. In this case, the buffer is set to undefined, and the status to nomatch.

  • Should the buffer be cleared on such errors?

On the one hand, clearing the buffer makes sense given the failure to complete the operation. On the other hand, perhaps rules could be designed to use the previous value of the buffer before the operation was initiated.

Note that the JavaScript implementation of chunks currently doesn't implement failed or forbidden, but these would make sense for access controlled chunk graphs and for application specific actions. Rule conditions can (in principle) test the status with @status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant