Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- chore: add 403 forbidden response to endpoints
- feat(jobs): add database_fork job type

## [0.19.0] - 2026-09-23
Expand Down
1 change: 1 addition & 0 deletions src/apis/information_schema_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use serde::{de::Error as _, Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum InformationSchemaError {
Status403(models::ApiErrorResponse),
Status404(models::ApiErrorResponse),
UnknownValue(serde_json::Value),
}
Expand Down
1 change: 1 addition & 0 deletions src/apis/jobs_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use serde::{de::Error as _, Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetJobError {
Status403(models::ApiErrorResponse),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: A 404 response body now deserializes as GetJobError::Status403 (not blocking).

GetJobError is #[serde(untagged)], so serde returns the first variant that matches. Status403 and Status404 wrap the same type, models::ApiErrorResponse. Line 89 parses the body without checking the HTTP status. Callers that match on Status404 stop matching after this change. The same change applies to InformationSchemaError in src/apis/information_schema_api.rs:20.

Many other error enums in src/apis/ already have this problem, so a fix belongs in the generator template. One option is to select the variant from status instead of relying on untagged deserialization. Another option is to note the variant change in the CHANGELOG entry.

Status404(models::ApiErrorResponse),
UnknownValue(serde_json::Value),
}
Expand Down
Loading