novus/unfinagled — pull request #5 by daggerrz (2013-08-20 02:05:59+00:00)
Title: Feature/error handling

This replaces the `TODO`s for error handling with basic filter (basically just the Twitter implementation without dependencies on Rich HTTP).

While implementing error handling, I noticed that the evaluation order of the partial functions were not correct and less efficient than necessary. A couple of notes:

1. Cycle intents were applied first and the result simply wrapped afterwards (line #37-38). The new code evaluates properly, but is less efficient as isDefined at is called twice. There might be a better way of doing this, though.
2. I replaced PF lifting with `applyOrElse` which is slightly more efficient.

As a side-note, I think keep-alive probably should be handled with a filter too.