You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Handle exception on subscription initialization (#1940)
### 📝 Description
In case of Subscription initiation failure, for example exception thrown
after some custom authentication/authorisation mechanism throws
exception, error was not passed through as response body, because of
exception:
```
java.lang.NullPointerException: graphQL.execute(input)
…<Flow<ExecutionResult>>() must not be null
at com.expediagroup.graphql.server.execution.GraphQLRequestHandler.executeSubscription(GraphQLRequestHandler.kt:167)
```
### 🔗 Related Issues
-
Copy file name to clipboardExpand all lines: servers/graphql-kotlin-server/src/main/kotlin/com/expediagroup/graphql/server/execution/GraphQLRequestHandler.kt
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ import kotlinx.coroutines.async
44
44
importkotlinx.coroutines.awaitAll
45
45
importkotlinx.coroutines.flow.Flow
46
46
importkotlinx.coroutines.flow.catch
47
+
importkotlinx.coroutines.flow.flowOf
47
48
importkotlinx.coroutines.flow.map
48
49
importkotlinx.coroutines.future.await
49
50
importkotlinx.coroutines.supervisorScope
@@ -61,6 +62,7 @@ open class GraphQLRequestHandler(
Copy file name to clipboardExpand all lines: servers/graphql-kotlin-server/src/test/kotlin/com/expediagroup/graphql/server/execution/GraphQLRequestHandlerTest.kt
0 commit comments