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

Added better exception messages for dynamic client name validation #2260

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

mskacelik
Copy link
Contributor

No description provided.

public static String validateTypeName(String typeName) {
if (typeName == null) {
throw new IllegalArgumentException(
"Invalid type name: '%s'. Type name does not match the regex pattern %s, please check the GraphQL specification %s"
Copy link
Member

@jmartisk jmartisk Jan 24, 2025

Choose a reason for hiding this comment

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

This would print Invalid type name: 'null', right? That's a bit confusing, because a (literal) null would actually be a valid type name :) (at least I think so, https://spec.graphql.org/draft/#sec-Names does not forbid it) Rather say Type name cannot be null or something

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch

@jmartisk jmartisk merged commit 464bd6b into smallrye:main Jan 27, 2025
5 checks passed
@github-actions github-actions bot added this to the 2.12.1 milestone Jan 27, 2025
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.

2 participants