Class ProblemDetails

java.lang.Object
com.predic8.membrane.core.exceptions.ProblemDetails

public class ProblemDetails extends Object
Utility class for ProblemDetails Spec
  • Constructor Details

    • ProblemDetails

      public ProblemDetails()
  • Method Details

    • user

      public static ProblemDetails user(boolean production)
    • internal

      public static ProblemDetails internal(boolean production)
    • gateway

      public static ProblemDetails gateway(boolean production)
    • security

      public static ProblemDetails security(boolean production)
    • openapi

      public static ProblemDetails openapi(boolean production)
    • problemDetails

      public static ProblemDetails problemDetails(String type, boolean production)
    • addSubType

      public ProblemDetails addSubType(String subType)
    • statusCode

      public ProblemDetails statusCode(int statusCode)
    • title

      public ProblemDetails title(String title)
    • detail

      public ProblemDetails detail(String humanReadableExplanation)
      Parameters:
      humanReadableExplanation - A human-readable explanation specific to this occurrence of the problem.
      Returns:
      Instance
    • instance

      public ProblemDetails instance(String instance)
    • extension

      public ProblemDetails extension(String key, Object value)
    • exception

      public ProblemDetails exception(Throwable e)
    • build

      public Response build()
      Does only log, when key in log is needed. The caller is responsible to do the log if there is something interessting.
    • parse

      public static ProblemDetails parse(Response r) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • isProduction

      public boolean isProduction()
    • getStatusCode

      public int getStatusCode()
    • getType

      public String getType()
    • getTitle

      public String getTitle()
    • getDetail

      public String getDetail()
    • getInstance

      public String getInstance()
    • getExtensions

      public HashMap<String,Object> getExtensions()
    • getException

      public Throwable getException()
    • toString

      public String toString()
      Overrides:
      toString in class Object