Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error codes for user defined local authenticator mgt. #6212

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,17 @@ public static AuthenticatorMgtServerRuntimeException buildRuntimeServerException
public enum AuthenticatorMgtError {

// Client errors.
ERROR_NOT_FOUND_AUTHENTICATOR("60001", "No Authenticator found.",
ERROR_NOT_FOUND_AUTHENTICATOR("60010", "No Authenticator found.",
"No Authenticator found by given authenticator name: %s."),
ERROR_OPERATION_ALLOWED_FOR_SYSTEM_AUTHENTICATOR("60002", "No operations allowed on system " +
"authenticators.", "Do not allow to perform any operation on system defined authenticator: %s."),
ERROR_AUTHENTICATOR_ALREADY_EXIST("60003", "The authenticator already exists.",
ERROR_CODE_INVALID_ENDPOINT_CONFIG("60011", "Invalid endpoint configuration provided.",
"Invalid endpoint configuration is provided for the authenticator %s."),
ERROR_CODE_ERROR_AUTHENTICATOR_NOT_FOUND("60012", "Authenticator not found.",
"Authenticator not found by the given name: %s."),
ERROR_AUTHENTICATOR_ALREADY_EXIST("60013", "The authenticator already exists.",
"The authenticator already exists for the given name: %s."),
ERROR_INVALID_AUTHENTICATOR_NAME("60004", "Authenticator name is invalid.",
ERROR_INVALID_AUTHENTICATOR_NAME("60014", "Authenticator name is invalid.",
"The provided authenticator name %s is not in the expected format %s."),
ERROR_BLANK_FIELD_VALUE("60004", "Invalid empty or blank value.",
ERROR_BLANK_FIELD_VALUE("60015", "Invalid empty or blank value.",
"Value for %s should not be empty or blank."),

// Server errors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private static AuthenticatorMgtException handleActionMgtException(AuthenticatorM
if (actionException instanceof ActionMgtClientException) {
ActionMgtClientException error = (ActionMgtClientException) actionException;
throw new AuthenticatorMgtClientException(
authenticatorMgtError.getCode(), error.getMessage(), error.getDescription());
authenticatorMgtError.getCode(), authenticatorMgtError.getMessage(), error.getDescription());
}

throw buildServerException(authenticatorMgtError, data);
Expand Down
Loading