handle exceptions in rack parsing of the query string

This fixes issue #267