Raise exception on error response