conveyal / gtfs-editor

A web-based GTFS editing framework. THIS PROJECT IS DEPRECATED. See https://github.com/ibi-group/datatools-ui for current version.
https://github.com/ibi-group/datatools-ui
MIT License
134 stars 63 forks source link

Trip Pattern UI should freeze and block further user input after receiving a 400 from the server #243

Open mattwigway opened 8 years ago

mattwigway commented 8 years ago

If the trip pattern ui sends a request to update a trip pattern to the server and gets back a 400 (or anything other than a 200), it should fail rather than continuing to let the user edit the trip pattern.

In #242, the backend would choke on certain updates, and the frontend would let the user continue to edit the feed, blissfully unaware that none of their edits were being saved.

The backend enforces a strict one-update-at-a-time policy in TripPattern#reconcilePatternStops, which will explode if more than one thing changes at once - so if an update has previously failed, all bets are off.