Class ExceptionMessage

java.lang.Object
org.springframework.data.rest.webmvc.support.ExceptionMessage

public class ExceptionMessage extends Object
A helper that renders an Exception JSON-friendly.

Only the outermost exception message is serialized into the HTTP response. The cause chain is accessible via getCause() for server-side use but is excluded from JSON serialization to prevent leaking internals to clients.

Author:
Jon Brisbin, Oliver Drotbohm
  • Constructor Details

    • ExceptionMessage

      public ExceptionMessage(Throwable throwable)
    • ExceptionMessage

      public ExceptionMessage(String message)
  • Method Details