refget-server 0.1.0

Axum-based GA4GH refget Sequences v2.0.0 and Sequence Collections v1.0.0 server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
pub mod seqcol;
pub mod sequences;

use axum::http::StatusCode;
use axum::response::{IntoResponse, Response};
use refget_model::ErrorResponse;

/// Create a JSON error response with the given status code and message.
pub fn json_error(status: StatusCode, message: impl Into<String>) -> Response {
    let body = ErrorResponse { status_code: status.as_u16(), message: message.into() };
    (status, axum::Json(body)).into_response()
}