Skip to content

Commit

Permalink
Merge pull request #8 from marmelab/fix/auth-error
Browse files Browse the repository at this point in the history
Fix error cannot read properties of undefined (reading 'status') in `authProvider` `checkError`
  • Loading branch information
adguernier authored Apr 3, 2024
2 parents 52741d2 + bb8ddcc commit c24183f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ra-directus/src/directusAuthProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const directusAuthProvider = (
}
},
checkError: error => {
const status = error.status;
const status = error?.status;
if (status === 401 || status === 403) {
return Promise.reject();
}
Expand Down

0 comments on commit c24183f

Please sign in to comment.