Class SubscriptionPublisherException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.graphql.execution.SubscriptionPublisherException
- All Implemented Interfaces:
Serializable
An exception raised after a GraphQL subscription
Publisher
ends with an exception, and after that
exception has been resolved to GraphQL errors.
The underlying transport, e.g. WebSocket, can handle a
SubscriptionPublisherException
and send a final error message to the
client with the list of GraphQL errors.
- Since:
- 1.0.1
- Author:
- Mykyta Ivchenko, Rossen Stoyanchev
- See Also:
-
Constructor Summary
ConstructorDescriptionSubscriptionPublisherException
(List<GraphQLError> errors, Throwable cause) Constructor with the resolved GraphQL errors and the original exception from the GraphQL subscriptionPublisher
. -
Method Summary
Modifier and TypeMethodDescriptionReturn the GraphQL errors the exception was resolved to by the configuredSubscriptionExceptionResolver
's.toMap()
Return anExecutionResult
specification map with the GraphQL errors.Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SubscriptionPublisherException
Constructor with the resolved GraphQL errors and the original exception from the GraphQL subscriptionPublisher
.- Parameters:
errors
- the list of resolved GraphQL errorscause
- the original exception
-
-
Method Details
-
getErrors
Return the GraphQL errors the exception was resolved to by the configuredSubscriptionExceptionResolver
's. These errors can be included in an error message to be sent to the client by the underlying transport. -
toMap
Return anExecutionResult
specification map with the GraphQL errors.- Since:
- 1.3.0
-