This repository has been archived by the owner on Mar 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
V8 #2
Open
zimbatm
wants to merge
5
commits into
master
Choose a base branch
from
v8
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
V8 #2
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cb3c1f1
Prepare for v8
zimbatm 542fded
Add basic resume to the protocol
zimbatm 1bad52c
subscription_failed event
zimbatm 4836b20
Protocol rendering update
zimbatm 90f0767
Resume data should also exist when we don't specify an ID
danielwaterworth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this give us enough information? Say it's
false
should there also be something to provide a bit more information?With potential future changes in mind - without trying to think too far ahead - would a code be better? And would some sort of error description property be useful?
If it's always going to be a "it worked" or "it didn't" then clearly a boolean value is fine. I do think a description field may be useful though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDs are incremental (but not exposed as such to the user) so we can make a few assumptions.
Here are some possible errors:
I don't feel it's particularly helpful to say: "Nope, too late. There are at most N events missing but it's probably less."
Initially the key was named
complete
. I don't mind changing that back or to something else.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with
ok: Bool
as long as whenok: false
occurs it's clear to the developer what they should do. Ideally they'll also get a why the error occurred.The first thing I'd do is check for some kind of error code. Then maybe take a look at the library docs. If the protocol provided a bit more information about what the error was that'd be great.
So, if we think of it from a customer developer point of view:
The JS console may then show something like
Does that seem like a sensible workflow? Could we expose that error description via the protocol?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resume error is likely to happen often, I don't want to push a big string over the network when that happens. As a developer you would do something like that in any of these cases:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍