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: lib.rs
    path of file: ./repos/bee/bee-node/bee-plugin/bee-plugin-dashboard/src
    
    the code of the file until where you have to start completion: // Copyright 2020-2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

/
    
async fn handle_rejection(err: Rejection) -> Result<impl Reply, Infallible> {
    let (http_code, err_code, reason) = match err.find() {
        // Handle custom rejections.
        Some(CustomRejection::NoUserProvided) => (StatusCode::BAD_REQUEST, "400", "user not found"),
        Some(CustomRejection::NoPasswordProvided) => (StatusCode::BAD_REQUEST, "400", "password not found"),
        Some(CustomRejection::InvalidCredentials) => (StatusCode::FORBIDDEN, "403", "wrong username or password"),
        Some(CustomRejection::InvalidJwt) => (StatusCode::FORBIDDEN, "403", "invalid JWT"),
        Some(CustomRejection::InternalError(s)) => {
            error!("dashboard error: {:?}", s);
            (StatusCode::INTERNAL_SERVER_ERROR, "500", "internal server error")
        }
        // handle default rejections
        _ => {
            if err.is_not_found() {
                (StatusCode::NOT_FOUND, "404", "data not found")
            } else if err.find::<warp::reject::MethodNotAllowed>().is_some() {
                (StatusCode::FORBIDDEN, "403", "access forbidden")
            } else {
                error!("unhandled rejection: {:?}", err);
                (StatusCode::INTERNAL_SERVER_ERROR, "500", "internal server error")
            }
        }
    };
    Ok(warp::reply::with_status(
        warp::reply::json(&ErrorBody::new(DefaultErrorResponse {
            code: err_code.to_string(),
            message: reason.to_string(),
        })),
        http_code,
    ))
}