pl.allegro.tech.hermes.api.ErrorDescription Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-api Show documentation
Show all versions of hermes-api Show documentation
Fast and reliable message broker built on top of Kafka.
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;
}
}