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

edu.stanford.protege.webprotege.gateway.RpcError Maven / Gradle / Ivy

The newest version!
package edu.stanford.protege.webprotege.gateway;

import org.springframework.http.HttpStatus;

import java.util.Collections;
import java.util.Map;

/**
 * Matthew Horridge
 * Stanford Center for Biomedical Informatics Research
 * 2021-07-22
 */
public record RpcError(int code,
                       String message,
                       Map data) {

    public static RpcError forStatus(HttpStatus status) {
        return new RpcError(status.value(), status.getReasonPhrase(), Collections.emptyMap());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy