All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cucumber.utils.exceptions.InvalidHttpResponseJsonFormatException Maven / Gradle / Ivy

package com.cucumber.utils.exceptions;

import org.apache.logging.log4j.message.ParameterizedMessage;

public class InvalidHttpResponseJsonFormatException extends Exception {
    private final static String MESSAGE = "Invalid HTTP Response Json format\nExpected format:\n{}\nBut Got:\n{}";
    private final static String EXPECTED_FORMAT = "{\n" +
            "  \"status\":  | \"\",\n" +
            "  \"body\": {} | [] | \"\",\n" +
            "  \"headers\": {},\n" +
            "  \"reason\": \"\"\n" +
            "}";

    public InvalidHttpResponseJsonFormatException(String source) {
        super(ParameterizedMessage.format(MESSAGE, new String[]{EXPECTED_FORMAT, source}));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy