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

Rework error representation #517

Merged
merged 22 commits into from
Apr 7, 2024
Merged

Rework error representation #517

merged 22 commits into from
Apr 7, 2024

Conversation

aumetra
Copy link
Member

@aumetra aumetra commented Apr 3, 2024

Closes #500

So, for the beginning I simply collapsed all the enum cases into a single "Other" case which has the representations of eyre::Report which is fairly compact from a memory usage standpoint.

That will drop the stack usage of errors down significantly (by at least 4x).

I'm still not convinced whether this is the correct solution.

@aumetra
Copy link
Member Author

aumetra commented Apr 3, 2024

This will also get a revamp of parts of the OAuth2 code which is a bit horribly organized.

@aumetra
Copy link
Member Author

aumetra commented Apr 6, 2024

kitsune-messaging is completely underutilized. Either we fix this up soon or we remove it.
I'd even opt to remove it for now. We don't need it yet. And in its current state, it's not really fit for usage anyway.

@aumetra
Copy link
Member Author

aumetra commented Apr 6, 2024

Removed kitsune-messaging for now. We gotta re-add it once we implement WebSocket stuff for the streaming API.
But until then, bye bye!

@aumetra
Copy link
Member Author

aumetra commented Apr 7, 2024

(well, damn. Of course coverage increases if we delete ~1k LoC)

@aumetra aumetra marked this pull request as ready for review April 7, 2024 22:53
@aumetra aumetra enabled auto-merge (squash) April 7, 2024 22:55
@aumetra aumetra merged commit 456df3c into main Apr 7, 2024
18 checks passed
@aumetra aumetra deleted the aumetra/error-repr branch April 7, 2024 22:59
aumetra added a commit that referenced this pull request Apr 7, 2024
* start error repr rework

* add kitsune-error crate

* progress

* rm unused dependencies

* progress

* progress

* progress

* progress

* finish

* fix checks

* fix tests

* enable serde for garde

* Add codecov token

* remove some more error enums

* remove another enum

* remove httperror

* improve somewhat

* make it possible to return responses as the 'body'

* use try-block polyfills everywhere
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.

Revamp internal error representation
1 participant