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

TopicName.parse could throw a more detailed ValidationException #1504

Open
SimonScholz opened this issue Feb 25, 2023 · 1 comment
Open

TopicName.parse could throw a more detailed ValidationException #1504

SimonScholz opened this issue Feb 25, 2023 · 1 comment
Assignees
Labels
api: pubsub Issues related to the googleapis/java-pubsub API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@SimonScholz
Copy link

SimonScholz commented Feb 25, 2023

Recently I faced an issue when using the Topic.parse(String formattedString) method, because the String being used was an environment variable defined within a pod.
I could've been faster in resolving the issue, if the formattedString originating from the environment variable would be printed out as part of the ValidationException's message.

Also see my PR for this minor improvement: #1505

Current behavior:

The message TopicName.parse: formattedString not in valid format is shown.

throw new ValidationException("TopicName.parse: formattedString not in valid format");

Expected / desired behavior:

The message TopicName.parse: formattedString (${actual value of formattedString}) not in valid format is shown.

throw new ValidationException(
        "TopicName.parse: formattedString (%s) not in valid format", formattedString);
@maitrimangal
Copy link
Member

maitrimangal commented Jun 12, 2023

Hi, your last PR was inside of an autogenerated class which is why I could not approve it-

Will find out how to write into that file!

@maitrimangal maitrimangal added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/java-pubsub API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants