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

pl.allegro.tech.hermes.api.ErrorDescription Maven / Gradle / Ivy

There is a newer version: 2.6.22
Show newest version
package pl.allegro.tech.hermes.api;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

public class ErrorDescription {

    private final String message;
    private final ErrorCode code;

    public static ErrorDescription error(String message, ErrorCode errorCode) {
        return new ErrorDescription(message, errorCode);
    }

    @JsonCreator
    public ErrorDescription(@JsonProperty("message") String message, @JsonProperty("code") ErrorCode code) {
        this.message = message;
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public ErrorCode getCode() {
        return code;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy