raise exception only if response code is not 200/OK