Skip to content

FIX: 404 status for result not found - #139

Merged
prasadlohakpure merged 1 commit into
mainfrom
fix/result_status_not_found
Aug 24, 2026
Merged

FIX: 404 status for result not found#139
prasadlohakpure merged 1 commit into
mainfrom
fix/result_status_not_found

Conversation

@prasadlohakpure

Copy link
Copy Markdown
Collaborator

This pull request introduces an update to the error handling logic in the statusForError function. Specifically, it adds a case to return a 404 Not Found status when the ErrResultNotReady error is encountered to match existing behaviour of 404 status if file is not yet available on s3.

Error handling improvements:

  • Updated the statusForError function in internal/pkg/heimdall/handler.go to return http.StatusNotFound (404) when the error matches ErrResultNotReady.

Copilot AI lite review requested due to automatic review settings August 24, 2026 10:26

Copilot AI left a comment

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.

Pull request overview

This PR updates Heimdall’s HTTP error-to-status mapping so the API returns 404 Not Found when a requested job result is not yet available (via ErrResultNotReady), aligning that condition with existing “file not found on S3” behavior.

Changes:

  • Added an ErrResultNotReady case in statusForError to return http.StatusNotFound (404).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@prasadlohakpure
prasadlohakpure merged commit cb249de into main Aug 24, 2026
8 checks passed
@prasadlohakpure
prasadlohakpure deleted the fix/result_status_not_found branch August 24, 2026 11:05
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.

3 participants