pub fn invalid_params_check<T, E: Display>(
    param: &str,
    r: Result<T, E>
) -> Result<T, Error>