# 8. Bayun Errors

Following are the errors thrown by the Bayun SDK, along with a description for each error.

* **BayunErrorAccessDenied** - If user access is denied(authentication token expires) or if user does not have right to perform certain operation, library returns BayunErrorAccessDenied.
* **BayunErrorEncryptionFailed** - If encryption fails, library returns BayunErrorEncryptionFailed.&#x20;
* **BayunErrorDecryptionFailed** - If decryption fails, library returns BayunErrorDecryptionFailed.&#x20;
* **BayunErrorInvalidPassphrase** - If passphrase is invalid, library returns BayunErrorInvalidPassphrase.&#x20;
* **BayunErrorInvalidPassword** - If password is invalid, library returns BayunErrorInvalidPassword.&#x20;
* **BayunErrorPassphraseCannotBeNull** - If passphrase for validation is null, library returns BayunErrorPassphraseCannotBeNull.&#x20;
* **BayunErrorInvalidCredentials** - If credentials are invalid, library returns BayunErrorInvalidCredentials.&#x20;
* **BayunErrorCredentialsCannotBeNull** - If credentials for authentication are null, library returns BayunErrorCredentialsCannotBeNull.
* **BayunErrorUserInActive** - If employee Status is Inactive, library returns BayunErrorUserInActive.&#x20;
* **BayunErrorAppNotLinked** - If app is not linked with Employee Account, library returns BayunErrorAppNotLinked.&#x20;
* **BayunErrorInvalidAppId** - If app id is invalid, library returns BayunErrorInvalidAppId.
* **BayunErrorCompanyNameCannotBeNull** - If CompanyName is null, library returns BayunErrorCompanyNameCannotBeNull.&#x20;
* **BayunErrorInvalidCompanyName** - If company name is invalid, library returns BayunErrorInvalidCompanyName.&#x20;
* **BayunErrorCompanyEmployeeIdCannotBeNull** - If CompanyEmployeeId is null, library returns BayunErrorCompanyEmployeeIdCannotBeNull.
* **BayunErrorGroupIdCannotBeNull** - If GroupId is null, library returns BayunErrorGroupIdCannotBeNull.&#x20;
* **BayunErrorEmployeeDoesNotExist** - If the employee does not exists, library returns BayunErrorEmployeeDoesNotExist.&#x20;
* **BayunErrorGroupDoesNotExistsForGroupId** - If groupId does not exists for GroupId, library returns BayunErrorGroupDoesNotExistsForGroupId.
* **BayunErrorGroupDoesNotExistForGroupId** - If employee does not belong to Group, library returns BayunErrorGroupDoesNotExistForGroupId.
* **BayunErrorMemberAlreadyExistsInGroup** - If member already exists in the Group, library returns BayunErrorMemberAlreadyExistsInGroup.
* **BayunErrorCannotJoinPrivateGroup** - If member tries to join private in the Group, library returns BayunErrorCannotJoinPrivateGroup.
* **BayunGroupTypeCannotBeNull** - If no group type is specified when creating a new group, library returns BayunGroupTypeCannotBeNull.&#x20;
* **BayunErrorAtleastThreeAnswersRequired** - If user answers less than Three security questions, library returns BayunErrorAtleastThreeAnswersRequired.
* **BayunErrorIncorrectAnswers** - If user has provided wrong answers for more than Two out of Five security questions, library returns BayunErrorIncorrectAnswers.
* **BayunErrorEmployeeDoesNotExistsInGivenCompany** - If autoCreateEmployee is disabled and the entered employee doesn't exist, SDK returns BayunErrorEmployeeDoesNotExistsInGivenCompany.
* **BayunErrorCompanyDoesNotExist** - If autoCreateEmployee is disabled and the provided company doesn't exist, SDK returns BayunErrorCompanyDoesNotExist.
* **BayunErrorInvalidAppSecret** - If the app secret provided is invalid, the SDK returns BayunErrorInvalidAppSecret.
* **BayunErrorEmployeeVerificationFailed** - If the verification fails for any of the keys of the employee, the SDK returns BayunErrorEmployeeVerificationFailed.
* **BayunErrorGroupDecryptionFailed** - If the decryption fails for any component of the group, the SDK returns BayunErrorGroupDecryptionFailed.
* **BayunErrorUserIsNotRegistered** - If user is not registered  and login is attempted.
* **BayunErrorEmployeeAppNotRegistered** - If an employeeApp is not registered.
* **BayunErrorLinkUserEmployeeOnAdmin** - User and employee exist, Login on admin panel with user to link user and employee.
* **BayunErrorIncorrectSecret** - Incorrect secret for face model.
* **BayunErrorRoomDoesNotExist** - If room does not exist.
* **BayunErrorEmployeeAlreadyExists** - If employee already exist.
* **BayunErrorUserAlreadyExists** - If the developer tries to register a user that already exists, SDK returns BayunErrorUserAlreadyExists.
* **BayunErrorIncompleteSecurityQuestions** - If the developer provides incomplete data for set security question, the SDK returns BayunErrorIncompleteSecurityQuestions.
* **BayunErrorGroupDecryptionFailed** - If the decryption fails for any component of the group, the SDK returns BayunErrorGroupDecryptionFailed.&#x20;
* **BayunErrorSomethingWentWrong** - If error is unknown, library returns BayunErrorSomethingWentWrong.&#x20;
* **BayunErrorAuthenticationFailed** - If user authentication fails, library returns BayunErrorAuthenticationFailed.
* **BayunErrorEmployeesDoesNotExist** - If the employee does not exists, library returns BayunErrorEmployeesDoesNotExist.
* **BayunErrorReauthenticationNeeded** - If it's needed for the user to be authenticated again, library returns BayunErrorReauthenticationNeeded.
* **BayunErrorUserPasswordVerificationEnabled** - If the user being used to register a new employee has password verification enabled, SDK returns BayunErrorUserPasswordVerificationEnabled.
* **BayunErrorPasswordCannotBeNull** - If password is null then SDK ruturns BayunErrorPasswordCannotBeNull.
* **BayunErrorEmployeeAuthorizationIsPending** - If employee authorization is pending then SDK returns BayunErrorEmployeeAuthorizationIsPending.
* **BayunErrorGroupKeySignatureCouldNotBeGenerated** - If group key signature could not be generated then SDK returns BayunErrorGroupKeySignatureCouldNotBeGenerated.
* **BayunErrorGroupPrivateKeySignatureCouldNotBeGenerated** - If group private key signature could not be generated then SDK returns BayunErrorGroupPrivateKeySignatureCouldNotBeGenerated.
* **BayunErrorNoGroupMembers** - If no members found in the addMembersToGroup function then SDK returns BayunErrorNoGroupMembers.
