wso2-extensions / identity-outbound-auth-voice-otp

VOICE OTP AUTHENTICATOR
Apache License 2.0
0 stars 2 forks source link

[TODO] Error handling #2

Open DimuthuKasunWP opened 2 months ago

DimuthuKasunWP commented 2 months ago

Description:

There are two improvements that we can do the codebase regarding error handling.

  1. Define constants for the error messages which are curently hardcoded in the place where they throw.
  2. Introduce error codes for the voice authenticator same as the EmailOTP authenticator[1]. The error codes are already introduced in the VoiceOTPConstants file and not using currently.

[1]https://github.com/wso2-extensions/identity-local-auth-emailotp/blob/main/components/org.wso2.carbon.identity.local.auth.emailotp/src/main/java/org/wso2/carbon/identity/local/auth/emailotp/constant/AuthenticatorConstants.java#L163