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

Impl debug trait for ErrorDetail #2608

Merged
merged 6 commits into from
Mar 26, 2024
Merged

Impl debug trait for ErrorDetail #2608

merged 6 commits into from
Mar 26, 2024

Conversation

zhouhuitian
Copy link
Contributor

@zhouhuitian zhouhuitian commented Mar 22, 2024

Fixes P-161

RequestVC failed logs as below:

received one error: Ok("Failed to build assertion due to: RequestVCFailed(BnbDigitDomainClub(Bnb999ClubMember), DataProviderError(BoundedVec([78, 111, 100, 101, 114, 101, 97, 108, 69, 114, 114, 111, 114, 40, 34, 78, 111, 100, 101, 114, 101, 97, 108, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 101, 114, 114, 111, 114, 58, 32, 69, 114, 114, 111, 114, 58, 32, 73, 79, 32, 101, 114, 114, 111, 114, 34, 41], 100)))")

Display the ErrorDetail message in string instead of bytes array.

@zhouhuitian zhouhuitian requested a review from a team March 22, 2024 06:20
Copy link
Contributor

@jonalvarezz jonalvarezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! a small but important one.

It'd be great if you could put an example of how it looks like now.

Copy link

linear bot commented Mar 25, 2024

@Kailai-Wang
Copy link
Collaborator

It'd be great if you could put an example of how it looks like now.

Yes it would be great

@zhouhuitian
Copy link
Contributor Author

An example from this thread:

Before :

received one error: Ok("Failed to build assertion due to: RequestVCFailed(VIP3MembershipCard(Gold), DataProviderError(BoundedVec([82, 101, 113, 117, 101, 115, 116, 69, 114, 114, 111, 114, 40, 34, 72, 116, 116, 112, 82, 101, 113, 69, 114, 114, 111, 114, 40, 73, 79, 40, 79, 115, 32, 123, 32, 99, 111, 100, 101, 58, 32, 49, 49, 49, 44, 32, 107, 105, 110, 100, 58, 32, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 82, 101, 102, 117, 115, 101, 100, 44, 32, 109, 101, 115, 115, 97, 103, 101, 58, 32, 92, 34, 85, 110, 107, 110, 111, 119, 110, 32, 101, 114, 114, 111, 114, 58, 32, 49, 49, 49], 100)))")

After:
DataProviderError(RequestError("HttpReqError(IO(Os { code: 111, kind: ConnectionRefused, message: \"Unknown error: 111)

@BillyWooo BillyWooo merged commit ab99090 into dev Mar 26, 2024
24 of 26 checks passed
@BillyWooo BillyWooo deleted the impl-debug-for-ErrorDetail branch March 26, 2024 20:40
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.

None yet

4 participants