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

Show a helpful error message when trying to claim a ride that's already been claimed #79

Closed
AlexGilleran opened this issue Nov 7, 2020 · 0 comments

Comments

@AlexGilleran
Copy link
Member

Multiple drivers might be browsing the Hills Carpal system at the same time. As a result, it's possible that:

  • An open ride exists
  • Two (or more) drivers open the ride - because it's not yet claimed by either driver, it appears open to both of them
  • One accepts the ride
  • The other driver can't see that the ride is now accepted by a different driver, so they claim it too

I'm not actually sure what happens in this situation. I suspect it's either:

  • The second driver gets a really generic error message (e.g. "Could not update ride"), or more likely...
  • The second driver overwrites the first driver's acceptance, so now they both think that they've successfully accepted the ride (very bad!)

The nicest solution would be to use Websockets or something to create real-time updates, but for now I think we should just keep it simple for now.

Criteria

  • A ride that's claimed by one driver can't be claimed by another driver (if this isn't already the case) and
  • If one driver tries to claim another driver's ride, we display a nice error message explaining that another driver has claimed the ride, and inviting them to claim a different one
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