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

[#5832] Minor: metalake error message #5843

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

muhammed-mamun
Copy link

Why are these changes necessary?

The original error message was unclear, which could confuse users when they encountered an issue with the 'name' field. Improving the error message helps to provide clearer guidance to users.

Related Issues

This PR addresses issue #5832 , which reported an unclear error message when the 'name' field is empty.
#5832

@tengqm
Copy link
Contributor

tengqm commented Dec 12, 2024

lgtm

@@ -74,6 +74,6 @@ public MetalakeCreateRequest(String name, String comment, Map<String, String> pr
@Override
public void validate() throws IllegalArgumentException {
Preconditions.checkArgument(
StringUtils.isNotBlank(name), "\"name\" field is required and cannot be empty");
StringUtils.isNotBlank(name), "\"name\" field is required. Please provide a valid name for the Metalake. It cannot be empty or only whitespace.");
Copy link
Member

@justinmclean justinmclean Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with this change is that it changes the Java API, not the Gravitino CLI. In the Java API context, this error message is correct, in the CLI context, the message could be more helpful. The change needs to be made in the CLI code not in the Java API code.

@xunliu
Copy link
Member

xunliu commented Dec 13, 2024

hi @muhammed-mamun Thank you for your contributions.
BTW, Please flow Gravitino community PR rule.
So, Please change your PR title from improved-metalake-erro-message to [#5832] Minor: metalake error message

@justinmclean
Copy link
Member

The build failed because the code is not correctly formatted. We use Spotless to ensure the code is formatted consistently. To fix this, you'll need to run ./gradlew :common:spotlessApply. But as I said, the fix will need to be in the CLI code, not here.

@muhammed-mamun muhammed-mamun changed the title improved-metalake-erro-message [#5832] Minor: metalake error message Dec 13, 2024
@justinmclean
Copy link
Member

@muhammed-mamun are you still working on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants