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

public class RepresentationException extends RuntimeException
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 Details

  • Method Details

    • getRepresentation

      public @Nullable Map<String,Object> getRepresentation()
      Return the entity "representation" input map.
    • getHandlerMethod

      public @Nullable HandlerMethod getHandlerMethod()
      Return the mapped controller method, or null if it could not be mapped.
    • getErrorType

      public ErrorType getErrorType()
      The classification for the error, ErrorType.BAD_REQUEST if the "__typename" argument was missing, or ErrorType.INTERNAL_ERROR otherwise.