Package io.rocketbase.commons.dto
Class ErrorResponse
- java.lang.Object
-
- io.rocketbase.commons.dto.ErrorResponse
-
public class ErrorResponse extends Object
wrapped response in case of errors
-
-
Constructor Summary
Constructors Constructor Description ErrorResponse()ErrorResponse(Integer status, String message)ErrorResponse(String errorMessage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ErrorResponseaddField(String path, String message)check if path already exists, add message to list or create new oneList<String>getFieldValue(String path)StringgetFirstFieldValue(String path)check within fields and get first value
return null when not found or emptybooleanhasField(String path)check if ErrorResponse has field info
-
-
-
Method Detail
-
addField
public ErrorResponse addField(String path, String message)
check if path already exists, add message to list or create new one
-
hasField
public boolean hasField(String path)
check if ErrorResponse has field info
-
getFirstFieldValue
public String getFirstFieldValue(String path)
check within fields and get first value
return null when not found or empty
-
-