You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: error.rs
    path of file: ./repos/iggy/server/src/http
    
    the code of the file until where you have to start completion: use axum::http::StatusCode;
use axum::response::{IntoResponse, Response};
use axum::Json;
use iggy::error::IggyError;
use serde::Serialize;
use thiserror::Error;
use tracing::error;

#[derive(Debug, Error)]
pub enum CustomError {
    #[error(transparent)]
    Error(#[from] IggyError),
}

#[derive(Debug, Serialize)]
pub struct ErrorResponse {
    pub id: u32,
    pub code: String,
    pub reason: String,
    pub field: Option<String>,
}

impl IntoResponse for CustomError {
    fn into_response(self) -> Response {
        match self {
            CustomError::Error(error) => {
                error!("There was an error: {error}");
                let status_code = match error 
    
    fn into_response(self) -> Response {
        match self {
            CustomError::Error(error) => {
                error!("There was an error: {error}");
                let status_code = match error {
                    IggyError::StreamIdNotFound(_) => StatusCode::NOT_FOUND,
                    IggyError::TopicIdNotFound(_, _) => StatusCode::NOT_FOUND,
                    IggyError::PartitionNotFound(_, _, _) => StatusCode::NOT_FOUND,
                    IggyError::SegmentNotFound => StatusCode::NOT_FOUND,
                    IggyError::ClientNotFound(_) => StatusCode::NOT_FOUND,
                    IggyError::ConsumerGroupIdNotFound(_, _) => StatusCode::NOT_FOUND,
                    IggyError::ConsumerGroupNameNotFound(_, _) => StatusCode::NOT_FOUND,
                    IggyError::ConsumerGroupMemberNotFound(_, _, _) => StatusCode::NOT_FOUND,
                    IggyError::CannotLoadResource(_) => StatusCode::NOT_FOUND,
                    IggyError::ResourceNotFound(_) => StatusCode::NOT_FOUND,
                    IggyError::IoError(_) => StatusCode::INTERNAL_SERVER_ERROR,
                    IggyError::WriteError(_) => StatusCode::INTERNAL_SERVER_ERROR,
                    IggyError::CannotParseInt(_) => StatusCode::INTERNAL_SERVER_ERROR,
                    IggyError::CannotParseSlice(_) => StatusCode::INTERNAL_SERVER_ERROR,
                    IggyError::CannotParseUtf8(_) => StatusCode::INTERNAL_SERVER_ERROR,
                    IggyError::Unauthenticated => StatusCode::UNAUTHORIZED,
                    IggyError::Unauthorized => StatusCode::FORBIDDEN,
                    _ => StatusCode::BAD_REQUEST,
                };
                (status_code, Json(ErrorResponse::from_error(error)))
            }
        }
        .into_response()
    }