handle non-200 responses