improve handling of server error results