Handle bad requests and 404s

Fixes #11