Add HTTP error messages for 400, 401, 404 to ease debugging.