Class RepresentationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.graphql.data.federation.RepresentationException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RepresentationNotResolvedException
Raised when a representation could not be resolved because:
- The "__typename" argument is missing.
- The "__typename" could not be mapped to a controller method.
The RepresentationNotResolvedException
subtype is raised when a
resolver returned null
or completed empty.
- Since:
- 1.3.0
- Author:
- Rossen Stoyanchev
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRepresentationException
(Map<String, Object> representation, String msg) RepresentationException
(Map<String, Object> representation, @Nullable HandlerMethod hm, String msg) -
Method Summary
Modifier and TypeMethodDescriptionThe classification for the error,ErrorType.BAD_REQUEST
if the "__typename" argument was missing, orErrorType.INTERNAL_ERROR
otherwise.@Nullable HandlerMethod
Return the mapped controller method, ornull
if it could not be mapped.Return the entity "representation" input map.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RepresentationException
-
RepresentationException
public RepresentationException(Map<String, Object> representation, @Nullable HandlerMethod hm, String msg)
-
-
Method Details
-
getRepresentation
-
getHandlerMethod
Return the mapped controller method, ornull
if it could not be mapped. -
getErrorType
The classification for the error,ErrorType.BAD_REQUEST
if the "__typename" argument was missing, orErrorType.INTERNAL_ERROR
otherwise.
-