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

Refactor Errors and some module re-organizing #16

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

sekunho
Copy link
Owner

@sekunho sekunho commented Apr 6, 2022

No description provided.

@sekunho
Copy link
Owner Author

sekunho commented Apr 6, 2022

@sekunho sekunho force-pushed the refactor/sort-out-error-variants branch 3 times, most recently from 3c1f684 to 01ba930 Compare April 7, 2022 14:09
@sekunho sekunho changed the title Improve error handling Refactor Errors and some module re-organizing Apr 7, 2022
@sekunho sekunho marked this pull request as ready for review April 7, 2022 14:11
*Better `Error`s*

The `Error` data constructors defined by me, weren't that descriptive,
and so the error messages in the client were impossible to deal with due
to how vague they were. If something bad happens, the client has no idea
if it was the server's fault, and even if it was there fault, they have
no idea what they did wrong. So now there's enough context to
distinguish if it's a 4xx or 5xx, and if it's the former, what can be
done to fix it.

*More organized modules*

The modules weren't as organized before so that is _slightly_ better now.
The DB connection stuff remain in the `db.rs` module, but the functions
that queried the db for data now live in a `url.rs` module.

There are still more things to be refactored. This just takes care of a
sizable chunk of them.
@sekunho sekunho force-pushed the refactor/sort-out-error-variants branch from 01ba930 to 0791717 Compare April 7, 2022 14:12
@sekunho sekunho merged commit 6fab22c into main Apr 7, 2022
@sekunho sekunho deleted the refactor/sort-out-error-variants branch April 7, 2022 14:12
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.

1 participant