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

Include Client's Input when an error occurs. #51

Merged
merged 6 commits into from
Jul 3, 2024
Merged

Conversation

yoshidan
Copy link
Contributor

@yoshidan yoshidan commented Jun 28, 2024

If an error occurs, wrap the original error and include the LightClient arguments in the error.

pub enum ClientError {
    LatestHeight {
        cause: Error,
        client_id: ClientId,
    },
    CreateClient {
        cause: Error,
        client_state: Any,
        consensus_sate: Any,
    },
    UpdateClient {
        cause: Error,
        client_id: ClientId,
        message: Any,
    },
    VerifyMembership {
        cause: Error,
        client_id: ClientId,
        prefix: CommitmentPrefix,
        path: String,
        value: Vec<u8>,
        proof_height: Height,
        proof: Vec<u8>,
    },
    VerifyNonMembership {
        cause: Error,
        client_id: ClientId,
        prefix: CommitmentPrefix,
        path: String,
        proof_height: Height,
        proof: Vec<u8>,
    },
}

Naohiro Yoshida added 6 commits June 28, 2024 13:22
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
@yoshidan yoshidan requested a review from 3100 July 1, 2024 01:05
@yoshidan yoshidan merged commit 5e7264d into main Jul 3, 2024
1 check passed
@yoshidan yoshidan deleted the detail_error branch July 3, 2024 09:23
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.

2 participants