Class BroadleafErrorAttributes

java.lang.Object
org.springframework.boot.web.servlet.error.DefaultErrorAttributes
com.broadleafcommerce.common.error.validation.web.BroadleafErrorAttributes
All Implemented Interfaces:
org.springframework.boot.web.servlet.error.ErrorAttributes, org.springframework.core.Ordered, org.springframework.web.servlet.HandlerExceptionResolver

public class BroadleafErrorAttributes extends org.springframework.boot.web.servlet.error.DefaultErrorAttributes
Spring Boot error attributes to make default errors look like an ApiError. This implementation is backwards compatible to spring boot 2.3.x.
Author:
Phillip Verheyden (phillipuniverse)
  • Field Summary

    Fields inherited from interface org.springframework.boot.web.servlet.error.ErrorAttributes

    ERROR_ATTRIBUTE

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    BroadleafErrorAttributes(boolean includeException)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getErrorAttributes(org.springframework.web.context.request.WebRequest webRequest, org.springframework.boot.web.error.ErrorAttributeOptions options)
     

    Methods inherited from class org.springframework.boot.web.servlet.error.DefaultErrorAttributes

    getError, getMessage, getOrder, resolveException

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BroadleafErrorAttributes

      public BroadleafErrorAttributes()
    • BroadleafErrorAttributes

      public BroadleafErrorAttributes(boolean includeException)
  • Method Details

    • getErrorAttributes

      public Map<String,Object> getErrorAttributes(org.springframework.web.context.request.WebRequest webRequest, org.springframework.boot.web.error.ErrorAttributeOptions options)
      Specified by:
      getErrorAttributes in interface org.springframework.boot.web.servlet.error.ErrorAttributes
      Overrides:
      getErrorAttributes in class org.springframework.boot.web.servlet.error.DefaultErrorAttributes