diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-08 16:25:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-08 15:25:18 +0000 |
| commit | 43d2ecd4f056bf38fe5f5656e550061c68c717f0 (patch) | |
| tree | c03d4f7f4786d8e61dddeaf8a367605de1d0809b /cli/tools/registry/api.rs | |
| parent | 664ffe2ad0d78865668aee2c94861ff9a2421592 (diff) | |
fix(registry): wait for already pending publish (#21663)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Diffstat (limited to 'cli/tools/registry/api.rs')
| -rw-r--r-- | cli/tools/registry/api.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/tools/registry/api.rs b/cli/tools/registry/api.rs index 672cdc02c..b8eb6c18e 100644 --- a/cli/tools/registry/api.rs +++ b/cli/tools/registry/api.rs @@ -53,6 +53,8 @@ pub struct PublishingTask { pub struct ApiError { pub code: String, pub message: String, + #[serde(flatten)] + pub data: serde_json::Value, #[serde(skip)] pub x_deno_ray: Option<String>, } @@ -97,6 +99,7 @@ pub async fn parse_response<T: DeserializeOwned>( code: "unknown".to_string(), message: format!("{}: {}", status, text), x_deno_ray, + data: serde_json::json!({}), }; return Err(err); } @@ -107,6 +110,7 @@ pub async fn parse_response<T: DeserializeOwned>( code: "unknown".to_string(), message: format!("Failed to parse response: {}, response: '{}'", err, text), x_deno_ray, + data: serde_json::json!({}), }) } |
