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

GraphQL queries with missing params are logged as ERROR/WARNING #256

Open
hbruch opened this issue Sep 13, 2023 · 0 comments
Open

GraphQL queries with missing params are logged as ERROR/WARNING #256

hbruch opened this issue Sep 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@hbruch
Copy link
Collaborator

hbruch commented Sep 13, 2023

The following graphql query

{
  stations { id }
}

results in ERROR/WARN log messages:

2023-09-13 11:32:22.082  WARN 20235 --- [nio-8080-exec-4] n.g.e.SimpleDataFetcherExceptionHandler  : Exception while fetching data (/stations) : Cannot invoke "java.lang.Double.doubleValue()" because "p" is null

java.lang.NullPointerException: Cannot invoke "java.lang.Double.doubleValue()" because "p" is null
	at org.entur.lamassu.controller.GraphQLQueryController.lambda$validateRange$1(GraphQLQueryController.java:183)
	at java.base/java.util.function.Predicate.lambda$negate$1(Predicate.java:80)
...

2023-09-13 11:32:22.087 ERROR 20235 --- [nio-8080-exec-4] g.k.e.error.DefaultGraphQLErrorHandler   : Error executing query Exception while fetching data (/stations) : Cannot invoke "java.lang.Double.doubleValue()" because "p" is null

java.lang.NullPointerException: Cannot invoke "java.lang.Double.doubleValue()" because "p" is null
	at org.entur.lamassu.controller.GraphQLQueryController.lambda$validateRange$1(GraphQLQueryController.java:183)
	at java.base/java.util.function.Predicate.lambda$negate$1(Predicate.java:80)
...

Validation for mandatory / expected parameters should validate for their provision.

@testower testower added the enhancement New feature or request label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants