regex works most of the way, still hangs when the requested route is invalid.