Fixes #2. Added error handlers for generic 404 and 500 responses.