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

[Task (Infrastructure)]: Return IndexerError instead of anyhow::Error from Checkpoint handler in iota-indexer #1961

Closed
tomxey opened this issue Aug 21, 2024 · 2 comments
Assignees
Labels
infrastructure Issues related to the Infrastructure Team sc-platform Issues related to the Smart Contract Platform group.

Comments

@tomxey
Copy link
Contributor

tomxey commented Aug 21, 2024

Description

Created based on #1701 (comment)

The main change would be to change error type in the Handler trait

async fn process_checkpoint(&mut self, checkpoint: &CheckpointData) -> Result<()> {
from anyhow::Error to IndexerError and then refactor the rest of the code accordingly.

Consider making use of the new error variant IndexerError::CheckpointProcessingError introduced in #1701

@tomxey tomxey added sc-platform Issues related to the Smart Contract Platform group. infrastructure Issues related to the Infrastructure Team labels Aug 21, 2024
@sergiupopescu199 sergiupopescu199 self-assigned this Nov 20, 2024
@sergiupopescu199
Copy link
Contributor

sergiupopescu199 commented Nov 20, 2024

@iotaledger/l1-core-infra

After the re-fork the Handler trait does not longer exist and now the Worker trait from iota-data-ingestion-core crate is replacing the logic, the general issue is that iota-data-ingestion-core does not have a dedicated Error type but use anyhow which is not ideal as it is a crate not an application, I suppose we could create a new issue and close this one as it could include more changes than anticipated because the Worker trait is implemented in the following crates:

  1. iota-analytics-indexer
  2. iota-data-ingestion
  3. iota-indexer-builder
  4. iota-indexer

@kodemartin
Copy link
Contributor

@iotaledger/l1-core-infra

After the re-fork the Handler trait does not longer exist and now the Worker trait from iota-data-ingestion-core crate is replacing the logic, the general issue is that iota-data-ingestion-core does not have a dedicated Error type but use anyhow which is not ideas as it is a crate not an application, I suppose we could create a new issue and close this one as it could include more changes than anticipated because the Worker trait is implemented in the following crates:

1. `iota-analytics-indexer`

2. `iota-data-ingestion`

3. `iota-indexer-builder`

4. `iota-indexer`

I agree @sergiupopescu199 let's plan a refactoring of iota-data-ingestion-core to use a library specific Error type through a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Issues related to the Infrastructure Team sc-platform Issues related to the Smart Contract Platform group.
Projects
None yet
Development

No branches or pull requests

3 participants