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] Make the "error handler" give more information #769

Open
alainncls opened this issue Oct 22, 2024 · 9 comments · May be fixed by #777
Open

[TASK] Make the "error handler" give more information #769

alainncls opened this issue Oct 22, 2024 · 9 comments · May be fixed by #777

Comments

@alainncls
Copy link
Collaborator

Currently, the errorHandler can only throw contextualized errors when their signature matches with the ABIs contained in the SDK.

  1. In the case where the error is of type ContractFunctionRevertedError, but doesn't have an "errorName", use its signature.
  2. In the case where the error is not of type ContractFunctionRevertedError, use its "shortMessage".
  3. In the fallback case, change the generic message to ${type} failed.
@Chirag-S-Kotian
Copy link

please assign this task to me

@Chirag-S-Kotian
Copy link

Chirag-S-Kotian commented Oct 23, 2024

hey @alainncls how to run the development server in pnpm here ,i already installed pnpm i and i dont know why i cant push the code forked repo

@alainncls
Copy link
Collaborator Author

Hey @Chirag-S-Kotian 👋

So, you should start by installing all the dependencies: pnpm i
Then you can develop on the errorHandler file and add more unit test in the corresponding test file.

Once your implementation gives you satisfaction and you have a good set of tests to cover it, you can then open a PR on this repo, from your forked repo. You can check GitHub's documentation to do so 😃

@Chirag-S-Kotian
Copy link

I already fixed that error handling and I don't know how to run the server in pnpm ,i actually use npm, don't know why I can't push the code to my forked repo it is saying something about prettier lint something problem 😔.

Can you help me with that??

@alainncls
Copy link
Collaborator Author

Ah yes, I see. When you installed the dependencies, it also installed a pre-commit hook with husky. It runs a few commands while committing your changes. Those commands are defined here.

And you can't use npm on this repo, it's based on pnpm solely.

What you need to check, is the linting and formatting of the code you've added/modified, it must follow the rules defined for the repo.

@Chirag-S-Kotian
Copy link

I already checked linting and prettier through pnpm ,there is no problem in terminal ,then it gives something git error problem 😕

@alainncls
Copy link
Collaborator Author

You can ignore the checks while committing: https://graphite.dev/guides/git-commit-skip-hooks#how-to-skip-git-commit-hooks
We'll see via the CI if there really is an issue with the code then.

@Chirag-S-Kotian
Copy link

here i forked this repo from dev branch https://github.com/Consensys/linea-attestation-registry.git and my repo is https://github.com/Chirag-S-Kotian/linea-attestation-registry.git it is also in dev branch i cant push the code to my forked repo could you please help me to resolve this error
image

@alainncls
Copy link
Collaborator Author

alainncls commented Oct 23, 2024

here i forked this repo from dev branch https://github.com/Consensys/linea-attestation-registry.git and my repo is https://github.com/Chirag-S-Kotian/linea-attestation-registry.git it is also in dev branch i cant push the code to my forked repo could you please help me to resolve this error

Is see that you managed to open a PR #777 , that's great! 👍
Let me check it out!

By the way, you can reach out to us on Discord if that's easier for you 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
2 participants