Class DataNeedNotFoundException

java.lang.Object
java.lang.Throwable
java.lang.Exception
energy.eddie.dataneeds.exceptions.DataNeedNotFoundException
All Implemented Interfaces:
Serializable

public class DataNeedNotFoundException extends Exception
See Also:
  • Constructor Details

    • DataNeedNotFoundException

      public DataNeedNotFoundException(String dataNeedId)
      Creates a new DataNeedNotFoundException that results in an HTTP status code 400.
      Parameters:
      dataNeedId - ID of the dataNeed that couldn't be found.
    • DataNeedNotFoundException

      public DataNeedNotFoundException(String dataNeedId, boolean isBadRequest)
      isBadRequest should be used to indicated that the Exception occurred because e.g. the permission request didn't contain a valid dataNeedId. If it's false, 404 is used (e.g. when dataNeedId is a path param).
      Parameters:
      dataNeedId - ID of the dataNeed that couldn't be found.
      isBadRequest - If true, HTTP status code 400 is returned, otherwise 404.
  • Method Details

    • isBadRequest

      public boolean isBadRequest()