Annotation Type Problem


  • @Retention(RUNTIME)
    @Target(TYPE)
    public @interface Problem
    The Problem annotation is applied to an exception thrown by a service to specify how the exception should be returned as a RFC 7807 JSON Problem Details Object during an API invocation.
    Author:
    Marcus Portmann
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String title
      The short, human-readable summary of the problem type.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int status
      The HTTP status code generated by the origin server for an occurrence of the problem.
      String type
      The URI reference that identifies the problem type.
    • Element Detail

      • title

        String title
        The short, human-readable summary of the problem type.
        Returns:
        the short, human-readable summary of the problem type
      • status

        int status
        The HTTP status code generated by the origin server for an occurrence of the problem.
        Returns:
        the HTTP status code generated by the origin server for an occurrence of the problem
        Default:
        500
      • type

        String type
        The URI reference that identifies the problem type.
        Returns:
        the URI reference that identifies the problem type
        Default:
        "about:blank"