Skip to content

Commit 6417ae3

Browse files
fix(http): prevent non-2xx status from triggering exceptions (#5)
1 parent 9b7414d commit 6417ae3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/javascript/src/lib/api-service.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ const authenticateClient = async () => {
1010
const apiUrl = process.env.JANE_API_URL || defaultHost
1111

1212
const resp = await request({
13+
// Prevent exceptions when requests have status code different from 2xx
14+
validateStatus: false,
1315
method: 'post',
1416
url: `${apiUrl}/oauth/token`,
1517
data: {

0 commit comments

Comments
 (0)