Class JsonErrorMessageParser


  • public class JsonErrorMessageParser
    extends Object
    • Field Detail

      • DEFAULT_ERROR_MESSAGE_PARSER

        public static final JsonErrorMessageParser DEFAULT_ERROR_MESSAGE_PARSER
        Standard JSON Error Message Parser that checks for JSON fields in this order: 'message', 'Message', 'errorMessage'
    • Constructor Detail

      • JsonErrorMessageParser

        public JsonErrorMessageParser​(List<String> errorMessageJsonLocations)
        Parameters:
        errorMessageJsonLocations - JSON field locations where the parser will attempt to extract the error message from.
    • Method Detail

      • parseErrorMessage

        public String parseErrorMessage​(com.fasterxml.jackson.databind.JsonNode jsonNode)
        Parse the error message from the response.
        Returns:
        Error Code of exceptional response or null if it can't be determined