Skip to content

chore: add 403 forbidden response to endpoints - #153

Merged
hotdata-automation[bot] merged 1 commit into
mainfrom
openapi-update-36252673801
Sep 26, 2026
Merged

hotdata-automation[bot] merged 1 commit into
mainfrom
openapi-update-36252673801

Conversation

@hotdata-automation

Copy link
Copy Markdown
Contributor

Auto-generated from the updated HotData OpenAPI spec.
Source: https://github.com/hotdata-dev/www/pull/434

@hotdata-automation
hotdata-automation Bot requested a review from a team as a code owner September 26, 2026 15:39
@hotdata-automation
hotdata-automation Bot requested review from rohan-hotdata and removed request for a team September 26, 2026 15:39
@hotdata-automation
hotdata-automation Bot enabled auto-merge (squash) September 26, 2026 15:39
Comment thread src/apis/jobs_api.rs
#[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.

@hotdata-automation
hotdata-automation Bot merged commit 64fe62c into main Sep 26, 2026
4 checks passed
@hotdata-automation
hotdata-automation Bot deleted the openapi-update-36252673801 branch September 26, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants