fail gracefully on bad http requests