Catch all exceptions and dispatch fail.
Merge pull request #287 from square/dimitris/catch-all

Catch all exceptions and dispatch fail.
Guard against the absence of path segments.
Merge pull request #289 from square/jw/no-path-segments

Guard against the absence of path segments.