kytrinyx/exercism.io — pull request #327 by arr-ee (2013-08-02 03:32:48+00:00)
Title: Fixed 500 on peek when there are no more exercises [fix #238]

Nobody wants to nitpick my code on exercism, so I decided to go deeper.

Please don’t consider this as a complete fix since it’s more of a rough draft.

Since user can have multiple tracks running, I can see two options here:
* Silently ignore completed tracks when there is at least one incomplete (for which we can provide a peek) and throw a message if we can’t (that’s what I’m doing in this PR.)
* Mark completed tracks in response, then handle it in CLI. This requires some refactoring and breaks compatibility with current CLI (not a big deal though since it just changes error message.)

But hey, it’s 7 AM so I can be wrong.