Skip to content

Commit

Permalink
Merge branch 'rjb/custom-domains-error-codes' into 'master'
Browse files Browse the repository at this point in the history
fix(custom-domains): changed error code to 400 for user misconfigurations [S3_UPLOAD]

When a user tries to register/update a custom domain and they haven't configured it correctly, we are now returning a 400 status code (Bad Request), instead of a 500 (Internal server error). 

See merge request dfinity-lab/public/ic!19454
  • Loading branch information
r-birkner committed May 27, 2024
2 parents 93dfd8b + 4a67bd4 commit 506e90c
Show file tree
Hide file tree
Showing 9 changed files with 538 additions and 641 deletions.
379 changes: 165 additions & 214 deletions Cargo.Bazel.Fuzzing.json.lock

Large diffs are not rendered by default.

129 changes: 63 additions & 66 deletions Cargo.Bazel.Fuzzing.toml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ dependencies = [
"language-tags",
"local-channel",
"mime",
"percent-encoding 2.3.0",
"percent-encoding",
"pin-project-lite",
"rand 0.8.5",
"sha1",
Expand Down Expand Up @@ -462,7 +462,7 @@ dependencies = [
"askama_escape",
"humansize",
"num-traits",
"percent-encoding 2.3.0",
"percent-encoding",
"serde",
"serde_json",
]
Expand Down Expand Up @@ -738,7 +738,7 @@ dependencies = [
"matchit",
"memchr",
"mime",
"percent-encoding 2.3.0",
"percent-encoding",
"pin-project-lite",
"rustversion",
"serde",
Expand Down Expand Up @@ -772,7 +772,7 @@ dependencies = [
"matchit",
"memchr",
"mime",
"percent-encoding 2.3.0",
"percent-encoding",
"pin-project-lite",
"rustversion",
"serde",
Expand Down Expand Up @@ -2024,24 +2024,20 @@ dependencies = [

[[package]]
name = "cloudflare"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28a69d53c61ddd5611ad0203c60aa02074d67f91bfb98db2225833f6bdc2f1a4"
version = "0.11.0"
source = "git+https://github.com/blind-oracle/cloudflare-rs.git?rev=386c8c6a0a95ad0c8a87aa1aac27b26a6cfec5cc#386c8c6a0a95ad0c8a87aa1aac27b26a6cfec5cc"
dependencies = [
"anyhow",
"async-trait",
"base64 0.13.1",
"cfg-if 0.1.10",
"chrono",
"http 0.2.9",
"percent-encoding 1.0.1",
"percent-encoding",
"reqwest 0.11.27",
"serde",
"serde_json",
"serde_qs 0.4.6",
"serde_with",
"serde_urlencoded",
"serde_with 2.3.3",
"thiserror",
"url",
"uuid 0.8.2",
"uuid",
]

[[package]]
Expand Down Expand Up @@ -2195,7 +2191,7 @@ version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb"
dependencies = [
"percent-encoding 2.3.0",
"percent-encoding",
"time",
"version_check",
]
Expand Down Expand Up @@ -2772,7 +2768,7 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d"
dependencies = [
"uuid 1.5.0",
"uuid",
]

[[package]]
Expand Down Expand Up @@ -2820,6 +2816,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3"
dependencies = [
"powerfmt",
"serde",
]

[[package]]
Expand Down Expand Up @@ -3161,7 +3158,7 @@ dependencies = [
"serde_cbor",
"serde_derive",
"serde_json",
"serde_with",
"serde_with 1.14.0",
"serde_yaml 0.9.30",
"sha2 0.10.8",
"sha2 0.9.9",
Expand Down Expand Up @@ -3224,7 +3221,7 @@ dependencies = [
"trust-dns-resolver",
"turmoil",
"url",
"uuid 1.5.0",
"uuid",
"vsock",
"walkdir",
"walrus 0.19.0",
Expand Down Expand Up @@ -3576,7 +3573,6 @@ version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc"
dependencies = [
"backtrace",
"version_check",
]

Expand Down Expand Up @@ -3894,7 +3890,7 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
dependencies = [
"percent-encoding 2.3.0",
"percent-encoding",
]

[[package]]
Expand Down Expand Up @@ -5376,6 +5372,7 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg 1.1.0",
"hashbrown 0.12.3",
"serde",
]

[[package]]
Expand Down Expand Up @@ -6680,7 +6677,7 @@ dependencies = [
"tagptr",
"thiserror",
"triomphe",
"uuid 1.5.0",
"uuid",
]

[[package]]
Expand Down Expand Up @@ -7291,7 +7288,7 @@ dependencies = [
"futures-util",
"once_cell",
"opentelemetry_api 0.18.0",
"percent-encoding 2.3.0",
"percent-encoding",
"rand 0.8.5",
"thiserror",
]
Expand All @@ -7310,7 +7307,7 @@ dependencies = [
"once_cell",
"opentelemetry_api 0.20.0",
"ordered-float 3.9.2",
"percent-encoding 2.3.0",
"percent-encoding",
"rand 0.8.5",
"regex",
"thiserror",
Expand All @@ -7331,7 +7328,7 @@ dependencies = [
"once_cell",
"opentelemetry 0.21.0",
"ordered-float 4.2.0",
"percent-encoding 2.3.0",
"percent-encoding",
"rand 0.8.5",
"thiserror",
"tokio",
Expand Down Expand Up @@ -7585,12 +7582,6 @@ dependencies = [
"base64ct",
]

[[package]]
name = "percent-encoding"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"

[[package]]
name = "percent-encoding"
version = "2.3.0"
Expand Down Expand Up @@ -8862,7 +8853,7 @@ dependencies = [
"mime",
"mime_guess",
"once_cell",
"percent-encoding 2.3.0",
"percent-encoding",
"pin-project-lite",
"rustls 0.21.12",
"rustls-pemfile 1.0.3",
Expand Down Expand Up @@ -8908,7 +8899,7 @@ dependencies = [
"log",
"mime",
"once_cell",
"percent-encoding 2.3.0",
"percent-encoding",
"pin-project-lite",
"rustls 0.22.2",
"rustls-native-certs 0.7.0",
Expand Down Expand Up @@ -9018,7 +9009,7 @@ dependencies = [
"rkyv_derive",
"seahash",
"tinyvec",
"uuid 1.5.0",
"uuid",
]

[[package]]
Expand Down Expand Up @@ -9797,25 +9788,13 @@ dependencies = [
"serde",
]

[[package]]
name = "serde_qs"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35965fa1d2413717053d67c2df1f5c3e1763fbf77200ea7e767523707bd5a0af"
dependencies = [
"data-encoding",
"error-chain",
"percent-encoding 1.0.1",
"serde",
]

[[package]]
name = "serde_qs"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6"
dependencies = [
"percent-encoding 2.3.0",
"percent-encoding",
"serde",
"thiserror",
]
Expand All @@ -9828,7 +9807,7 @@ checksum = "0431a35568651e363364210c91983c1da5eb29404d9f0928b67d4ebcfa7d330c"
dependencies = [
"axum 0.6.20",
"futures",
"percent-encoding 2.3.0",
"percent-encoding",
"serde",
"thiserror",
]
Expand Down Expand Up @@ -9874,7 +9853,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff"
dependencies = [
"serde",
"serde_with_macros",
"serde_with_macros 1.5.2",
]

[[package]]
name = "serde_with"
version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe"
dependencies = [
"base64 0.13.1",
"chrono",
"hex",
"indexmap 1.9.3",
"serde",
"serde_json",
"serde_with_macros 2.3.3",
"time",
]

[[package]]
Expand All @@ -9889,6 +9884,18 @@ dependencies = [
"syn 1.0.109",
]

[[package]]
name = "serde_with_macros"
version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f"
dependencies = [
"darling 0.20.3",
"proc-macro2 1.0.76",
"quote 1.0.35",
"syn 2.0.48",
]

[[package]]
name = "serde_yaml"
version = "0.8.26"
Expand Down Expand Up @@ -10489,7 +10496,7 @@ dependencies = [
"debugid",
"memmap2",
"stable_deref_trait",
"uuid 1.5.0",
"uuid",
]

[[package]]
Expand Down Expand Up @@ -11086,7 +11093,7 @@ dependencies = [
"http-body 0.4.5",
"hyper 0.14.27",
"hyper-timeout",
"percent-encoding 2.3.0",
"percent-encoding",
"pin-project",
"prost 0.11.9",
"tokio",
Expand All @@ -11113,7 +11120,7 @@ dependencies = [
"http-body 0.4.5",
"hyper 0.14.27",
"hyper-timeout",
"percent-encoding 2.3.0",
"percent-encoding",
"pin-project",
"prost 0.12.2",
"tokio",
Expand Down Expand Up @@ -11181,7 +11188,7 @@ dependencies = [
"tower-layer",
"tower-service",
"tracing",
"uuid 1.5.0",
"uuid",
]

[[package]]
Expand All @@ -11204,7 +11211,7 @@ dependencies = [
"tower-layer",
"tower-service",
"tracing",
"uuid 1.5.0",
"uuid",
]

[[package]]
Expand Down Expand Up @@ -11685,7 +11692,7 @@ checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
dependencies = [
"form_urlencoded",
"idna 0.4.0",
"percent-encoding 2.3.0",
"percent-encoding",
"serde",
]

Expand Down Expand Up @@ -11713,16 +11720,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"

[[package]]
name = "uuid"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
dependencies = [
"getrandom 0.2.10",
"serde",
]

[[package]]
name = "uuid"
version = "1.5.0"
Expand Down Expand Up @@ -11859,7 +11856,7 @@ dependencies = [
"mime",
"mime_guess",
"multer",
"percent-encoding 2.3.0",
"percent-encoding",
"pin-project",
"rustls-pemfile 1.0.3",
"scoped-tls",
Expand Down
Loading

0 comments on commit 506e90c

Please sign in to comment.