return error if status code isn't 200