Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix is not found error #227

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Conversation

jakubno
Copy link
Member

@jakubno jakubno commented Dec 20, 2024

Description

Handle missing check

Description by Callstackai

This PR modifies the error handling in the GetLastSnapshot function to properly handle cases where a snapshot is not found.

Diagrams of code changes
sequenceDiagram
    participant Caller
    participant SnapshotHandler
    participant Database

    Caller->>SnapshotHandler: Get Snapshot Build
    SnapshotHandler->>Database: Query for snapshot
    
    alt Error occurs
        Database-->>SnapshotHandler: Returns error
        SnapshotHandler-->>Caller: Return "failed to get snapshot build" error
    else Not Found
        Database-->>SnapshotHandler: Returns NotFound
        SnapshotHandler-->>Caller: Return "no snapshot build found" error
    else Success
        Database-->>SnapshotHandler: Returns snapshot data
        SnapshotHandler-->>Caller: Return snapshot and build
    end
Loading
Files Changed
FileSummary
packages/shared/pkg/db/snapshot.goUpdated error handling to return a specific message when no snapshot build is found.

Base automatically changed from dev to main January 1, 2025 17:09
@ValentaTomas ValentaTomas added the bug Something isn't working label Jan 7, 2025
@ValentaTomas ValentaTomas self-assigned this Jan 7, 2025
@ValentaTomas ValentaTomas changed the base branch from main to e2b-foxtrot January 8, 2025 04:06
@ValentaTomas ValentaTomas changed the base branch from e2b-foxtrot to main January 8, 2025 04:06
@ValentaTomas ValentaTomas assigned jakubno and unassigned ValentaTomas Jan 8, 2025
@ValentaTomas ValentaTomas merged commit 72de688 into main Jan 8, 2025
1 check passed
@ValentaTomas ValentaTomas deleted the fix-unhandled-is-not-found-error branch January 8, 2025 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants