1use crate::TileSet;
2
3#[derive(Debug, thiserror::Error)]
5pub enum Error {
6 #[error("Server request failed: {0}")]
7 Reqwest(#[from] reqwest::Error),
8
9 #[error("Server returned HTTP error code: {0}")]
10 Http(reqwest::StatusCode),
11}
12
13#[derive(Debug, thiserror::Error, PartialEq)]
15pub enum ArgumentError {
16 #[error("Zoom level {0} is too large for the tilset {1} (max: {2})")]
17 ZoomTooLarge(u32, TileSet, u32),
18
19 #[error("Zoom level {0} is too small for the tilset {1} (min: {2})")]
20 ZoomTooSmall(u32, TileSet, u32),
21
22 #[error("X coordinate {0} is too large for the zoom level {1} (max X: {2})")]
23 XTooLarge(u32, u32, u32),
24
25 #[error("Y coordinate {0} is too large for the zoom level {1} (max Y: {2})")]
26 YTooLarge(u32, u32, u32),
27}