changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / rust/lib/dl/src/errors.rs

changeset 698: 96958d3eb5b0
parent: 966f92770ddf
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 04 Oct 2024 22:04:59 -0400
permissions: -rw-r--r--
description: fixes
1 use thiserror::Error;
2 
3 #[derive(Debug, Error)]
4 pub enum DownloadError {
5  #[error("http request returned an unsuccessful status code: {0}")]
6  HttpStatus(u32),
7  #[error("file not found")]
8  FileNotFound,
9  #[error("download backend '{0}' unavailable")]
10  BackendUnavailable(&'static str),
11  #[error("{0}")]
12  Message(String),
13  #[error(transparent)]
14  IoError(#[from] std::io::Error),
15  #[cfg(feature = "reqwest-backend")]
16  #[error(transparent)]
17  Reqwest(#[from] ::reqwest::Error),
18  #[cfg(feature = "curl-backend")]
19  #[error(transparent)]
20  CurlError(#[from] curl::Error),
21 }