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

Fixing empty req issue. #2849

Merged
merged 3 commits into from
May 11, 2023
Merged

Fixing empty req issue. #2849

merged 3 commits into from
May 11, 2023

Conversation

dessalines
Copy link
Member

I ran into this issue when adding lemmy-ui support for GetFederatedInstances.

Unfortunately, due to some peculiarities with our http and websocket code, request objects can not be empty / null / empty null unit structs. We have only two, and adding an optional auth fixes it.

@dessalines dessalines requested a review from Nutomic as a code owner May 10, 2023 14:46
@Nutomic
Copy link
Member

Nutomic commented May 10, 2023

Is this a problem with websocket, http or both? If only websocket then you should leave a comment to remove these fields after we remove the websocket api.

@dessalines
Copy link
Member Author

dessalines commented May 11, 2023

HTTP actually. The rust backend for some reason can't deserialize a null / empty GET request, and gives an error.

@Nutomic
Copy link
Member

Nutomic commented May 11, 2023

Thats odd, maybe its because of our wrapper structs. I guess after removing websocket we can get rid of them, and also remove this hack.

@Nutomic Nutomic merged commit 32a5567 into main May 11, 2023
Nutomic pushed a commit that referenced this pull request May 19, 2023
* Fixing empty req issue.

* Forgot skip serializing none.
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.

2 participants