Skip to content

send original error in ProxyGetRequest#1516

Merged
niklasad1 merged 12 commits intoparitytech:masterfrom
dcfreire:master
Jan 14, 2025
Merged

send original error in ProxyGetRequest#1516
niklasad1 merged 12 commits intoparitytech:masterfrom
dcfreire:master

Conversation

@dcfreire
Copy link
Contributor

@dcfreire dcfreire commented Jan 9, 2025

closes #1515

@dcfreire dcfreire requested a review from a team as a code owner January 9, 2025 18:27
@dcfreire
Copy link
Contributor Author

dcfreire commented Jan 9, 2025

I tried using an enum instead of deserializing in two places, but it did not work, serde kept failing with "data did not match any variant of untagged enum". I think it has something to do with untagged enums expecting all parameters of the json object to be in the variant's struct, while structs will deserialize even if the json contains extra fields.

@niklasad1
Copy link
Contributor

I tried using an enum instead of deserializing in two places, but it did not work, serde kept failing with "data did not match any variant of untagged enum". I think it has something to do with untagged enums expecting all parameters of the json object to be in the variant's struct, while structs will deserialize even if the json contains extra fields.

Yes, we are using serde_json::value::RawValue which doesn't work with untagged enums serde-rs/json#779

@niklasad1
Copy link
Contributor

niklasad1 commented Jan 10, 2025

If you merge master then the UI tests should pass I fixed it right now, new stable rust version broke it

@niklasad1
Copy link
Contributor

Looks good, nice work

@niklasad1 niklasad1 changed the title enha: send original error response in ProxyGetRequest send original error in ProxyGetRequest Jan 14, 2025
@niklasad1 niklasad1 merged commit 98ea4a6 into paritytech:master Jan 14, 2025
@niklasad1 niklasad1 mentioned this pull request Apr 23, 2025
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.

Errors to requests that go through ProxyGetRequest are always internal error

4 participants