Skip to content

Commit 03c4fb6

Browse files
authored
Adds 400 or 401 check to nativeAPI test (Azure#13513)
1 parent 9fb66a7 commit 03c4fb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/cosmosdb/cosmos/test/public/functional/offer.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ describe("NodeJS CRUD Tests", function() {
117117
await client.offer(offerBadId._self).replace(offerBadId);
118118
assert.fail("Must throw after replace with bad id");
119119
} catch (err) {
120-
const badRequestErrorCode = 400;
121-
assert.equal(err.code, badRequestErrorCode);
120+
// check for 400 or 401 since some backends validate auth first
121+
assert(err.code === 400 || err.code === 401);
122122
}
123123
});
124124
});

0 commit comments

Comments
 (0)