Skip to content

Commit

Permalink
BED-5065: Add null checks to error
Browse files Browse the repository at this point in the history
  • Loading branch information
wes-mil committed Dec 6, 2024
1 parent 40838fc commit 4d521b9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const CreateUserForm: React.FC<{
};

const checkError = (err): string => {
if (err.response.data.errors[0].message == 'principal name must be unique') {
if (err.response?.data?.errors[0]?.message == 'principal name must be unique') {
return 'Principal name is already in use.';
} else {
return 'An unexpected error occurred. Please try again.';
Expand Down

0 comments on commit 4d521b9

Please sign in to comment.