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

[XCM] don't ignore errors #2408

Open
xlc opened this issue Nov 20, 2023 · 10 comments · Fixed by #4982 · May be fixed by #7003
Open

[XCM] don't ignore errors #2408

xlc opened this issue Nov 20, 2023 · 10 comments · Fixed by #4982 · May be fixed by #7003
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. I4-refactor Code needs refactoring. T6-XCM This PR/Issue is related to XCM.

Comments

@xlc
Copy link
Contributor

xlc commented Nov 20, 2023

          someone should make a rule to disallow ignoring errors

Originally posted by @xlc in #2405 (comment)

Need to make sure every .map_err(|_| are justified with good reasons.

@bkchr
Copy link
Member

bkchr commented Nov 20, 2023

map_err is not ignoring the error, it just maps it... as the name is already hinting.

@xlc
Copy link
Contributor Author

xlc commented Nov 20, 2023

but |_| is ignoring it and it looks like a sad face

@ggwpez
Copy link
Member

ggwpez commented Mar 13, 2024

Should probably still be logged to ease debuggability.

@ggwpez ggwpez added C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. I4-refactor Code needs refactoring. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. labels Mar 13, 2024
@ggwpez ggwpez changed the title don't ignore errors [XCM] don't ignore errors Mar 13, 2024
@franciscoaguirre franciscoaguirre added the T6-XCM This PR/Issue is related to XCM. label Mar 25, 2024
@franciscoaguirre franciscoaguirre moved this from Draft to Backlog in Parity Roadmap Mar 28, 2024
@ayevbeosa
Copy link
Contributor

Hi @xlc, I am interested in working on this, my assumption is for occurrences of .map_err(|_| , it would look like this
.map_err(|e| { log::error!(target: "xcm::pallet_xcm::function_name", "Some description: {:?}", e);

@xlc
Copy link
Contributor Author

xlc commented Jul 7, 2024

yes

ayevbeosa pushed a commit to ayevbeosa/polkadot-sdk that referenced this issue Jul 9, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 15, 2024
Added error logs in pallet-xcm to help in debugging, fixes #2408 

## TODO

- [x] change `log::error` to `tracing::error` format for `xcm-executor`
- [x] check existing logs, e.g. this one can be extended with more info
`tracing::error!(target: "xcm::reanchor", ?error, "Failed reanchoring
with error");`
- [x] use `tracing` instead of `log` for `pallet-xcm/src/lib.rs`

---------

Co-authored-by: Ayevbeosa Iyamu <aiyamu@vatebra.com>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
@acatangiu
Copy link
Contributor

Issue is not complete, still many many XCM filters/helpers/matchers/types to add logging to.

@acatangiu acatangiu reopened this Oct 15, 2024
@acatangiu
Copy link
Contributor

@ayevbeosa
Copy link
Contributor

Everything in

should have logging

I guess I'd like to complete this till the very end then.

@Krayt78
Copy link
Contributor

Krayt78 commented Nov 27, 2024

@ayevbeosa Is this still being worked on ?

@ayevbeosa
Copy link
Contributor

Yes please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. I4-refactor Code needs refactoring. T6-XCM This PR/Issue is related to XCM.
Projects
Status: Backlog
7 participants