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

Feature : JobError using thisError #78

Merged
merged 30 commits into from
Aug 16, 2024
Merged

Conversation

heemankv
Copy link
Contributor

@heemankv heemankv commented Aug 9, 2024

Important : Duplicate PR for #66.

This PR solves #65.

  • This PR introduces thiserror for clearer description and syntax of throwing errors.
  • This PR scopes for Jobs only!
  • Further implementation to overall codebase are to be handled incrementally.
  • This PR depends on PR Tests for DA job #61 and PR Feat : add testing fixtures and a basic test #52 (only after they are merged should this branch be merged to main.)
  • Implementation also removes log::debug! from various places for which thiserror error handling is introduced.
  • Only Errors specific to the Job are handled, general errors are thrown as Other Errors.

@heemankv heemankv added the enhancement New feature or request label Aug 9, 2024
@heemankv heemankv self-assigned this Aug 9, 2024
@coveralls
Copy link

coveralls commented Aug 14, 2024

Coverage Status

coverage: 56.401% (+0.4%) from 56.026%
when pulling 8fa7760 on feat/JobError-Using-ThisError
into 59d50ad on main.

@heemankv heemankv merged commit 7e771e7 into main Aug 16, 2024
8 checks passed
@heemankv heemankv deleted the feat/JobError-Using-ThisError branch August 16, 2024 06:44
ocdbytes added a commit that referenced this pull request Oct 16, 2024
* update: added thiserror JobError

* update: introducing DaError

* update: add ProverJobError

* update: Register proof JobError

* update: SNOS proof JobError

* update: JobError on Queue

* update: added fix for borrow in state update process job

* update: cleaning rework for JobError

* update: wrap_err_with -> wrap_err wherever used with string

* update: moved all JobErrors to top of file

* update: Errors for consume_job_from_queue

* update: linting fixes

* update: optimised consume_job_from_queue match statement

* update: code optimisation based on PR reviews

* chore: lint fixes

* chore: lint fixes

* update: error matching optimised

* update: block_no to String and correct assert on test_da_job_process_job_failure_on_small_blob_size

* fix: linting

* update: error matching checks

* update: test state_update fix

* update: test state_update fix

* update: test state_update fix

* fix: lint

* chore: imports fixed

* feat : updated the errors enum and implemented OtherTest wrapper for eyre errors

* feat : fixed tests

---------

Co-authored-by: Arun Jangra <arunjangra1001@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants